Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
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 exploiting the Monastery: (6)
As of 2017-02-25 00:43 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Before electricity was invented, what was the Electric Eel called?






    Results (364 votes). Check out past polls.