in reply to Find strings
Since I don't have DOS available I can't test my suggestion, but after reading Perlio I guess a binmode F, ":raw";
After the line with the open should help.
By the way you should always check if system calls like open() actually succeed:
open my $f, '<', 'text.txt' or die "can't open file 'text.txt' for reading: $!"; binmode $f, ':raw'; while (<$f>) { print "Result: $1" if /particularly(.*)/; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Find strings
by toros (Initiate) on Oct 01, 2010 at 08:33 UTC | |
by moritz (Cardinal) on Oct 01, 2010 at 08:56 UTC |