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 ( [id://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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1000637]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others exploiting the Monastery: (4)
As of 2024-04-18 02:01 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found