Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

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

by GotToBTru (Priest)
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: (6)
As of 2015-07-04 18:27 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (60 votes), past polls