in reply to Strange grep and matching behaviour...
my @slurp = grep { ! /fubar/ } <FILE>;
And here's what I used to test it:
my @slurp = grep { ! /fubar/ } <DATA>; use Data::Dumper; print Dumper \@slurp; __DATA__ asdffubarasdf 1 as;ldja;slk;alskj 2 as;dlkfjfubarasdf 3 as;ldfkj;laksf;lkasj 4 asfd;aslfk 5 fubar 6
Cheers,
Ovid
Join the Perlmonks Setiathome Group or just click on the the link and check out our stats.
|
|---|