R. Joseph Newton wrote: > > Maybe you should do a binary/text dump of the file. Chose a set of meanguful > printing characters to print as character, printi anything outside of this range > as hex. Something like:
I like that: 'meanguful'. I shall have to try to fir it into my conversation :) > open IN, 'hello.obj' or die "Couldn't open damnfool file: $!"; > binmode IN; > local $/; > > my $whole_durn_thang = <IN>; > my @chars = split //, $whole_durn_thang; > my $alphabetic = 0; > foreach $char (@chars) { > if ($char =~ /[EMAIL PROTECTED]&*()_+ ,]/) { > print "\n" unless $alphabetic; > print $char; > $alphabetic = 1; > } else { > print "\n" if $alphabetic; > printf "%02x ", ord $char, > $alphabetic = 0; > } > } Hi Joseph. Do you really mean this? What about these? " $ % ' - . / : ; < = > ? [ \ ] ` { | } I would code if ($char =~ /[[:graph:]]/) { : } which chooses everything that's visible on-screen. [snip] Rob -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>