Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: grep return the entire file not the line which matches

by GotToBTru (Chaplain)
on Aug 03, 2011 at 15:45 UTC ( #918313=note: print w/ replies, xml ) Need Help??


in reply to grep return the entire file not the line which matches

Check your syntax on the grep command as well. It should probably be:
@data=grep /$en/,@eng_dat;


Comment on Re: grep return the entire file not the line which matches
Download Code
Re^2: grep return the entire file not the line which matches
by Anonymous Monk on Aug 10, 2011 at 12:35 UTC
    This is the correct. The syntax would be:
    @data=grep /$en/,@eng_dat;
    or it can be equivalently:
    @data=grep (/$en/,@eng_dat);
    as mentioned here: http://programmingbulls.com/perl-grep

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://918313]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (17)
As of 2014-08-22 14:59 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (158 votes), past polls