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

Re^5: Multiple foreach loops in single statement

by Anonymous Monk
on Oct 24, 2012 at 13:30 UTC ( #1000637=note: print w/replies, xml ) Need Help??


in reply to Re^4: Multiple foreach loops in single statement
in thread Multiple foreach loops in single statement

No , split doesn't work with lists, it forces scalar context on EXPR, so qx returns a STRING, not a list
$ perl -wle " print for split //, @ARGV " asdf 1 $ perl -wle " print for split //, @ARGV " a s d f 4 $ perl -wle " print for split //, $ARGV[0] " asdf a s d f

See Tutorials: Context in Perl: Context tutorial, "List" Is a Four-Letter Word, Easy Reference for Contexts

Log In?
Username:
Password:

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

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













    Results (168 votes). Check out past polls.