faqts : Computers : Programming : Languages : Perl

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

2 of 4 people (50%) answered Yes
Recently 2 of 4 people (50%) answered Yes

Entry

How do I distinguish between printable strings andpacked binary data stored as strings?

Aug 12th, 2005 17:02
code select, flurpy flurp,


if ($inputstr!~/[\040-\176]/) {
  print "binary";
} else {
  print "printable";
}