Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: Confusing grep behavior

by grep (Monsignor)
on Dec 04, 2007 at 21:19 UTC ( #654958=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    my @res = grep $_ split(",", "a,b,c,d,,f,,h"); #is a syntax error.
    
  2. or download this
    my @res = grep $_, split(",", "a,b,c,d,,f,,h");
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://654958]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (4)
As of 2016-12-03 12:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    On a regular basis, I'm most likely to spy upon:













    Results (55 votes). Check out past polls.