Beefy Boxes and Bandwidth Generously Provided by pair Networks vroom
go ahead... be a heretic
 
PerlMonks  

Re: Strange grep and matching behaviour...

by Ovid (Cardinal)
on May 22, 2002 at 17:24 UTC ( [id://168589]=note: print w/replies, xml ) Need Help??

This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.


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.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://168589]
help
Sections?
Information?
Find Nodes?
Leftovers?
    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.