Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: Surprise: scalar(($x, $y) = split)

by Fox (Pilgrim)
on Oct 28, 2011 at 18:17 UTC ( [id://934470]=note: print w/replies, xml ) Need Help??


in reply to Surprise: scalar(($x, $y) = split)

Not so pretty.. but anyway:
$ perl -wle '(my($x,$y) = @{[]} = split/ /,"foo bar") == 2 or die "boo +";warn "[$x] [$y]"' [foo] [bar] at -e line 1. $ perl -wle '(my($x,$y) = @{[]} = split/ /,"foo bar baz") == 2 or die +"boo";warn "[$x] [$y]"' boo at -e line 1.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (3)
As of 2024-04-19 17:09 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found