Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
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


Comment on Re^5: Multiple foreach loops in single statement
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (6)
As of 2014-07-24 04:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (157 votes), past polls