Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re: shift in list context buggy? (scalar)

by tye (Sage)
on Nov 09, 2013 at 14:32 UTC ( [id://1061828]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    my( $a, $b ) = ( shift @as, shift @bs );
    
  2. or download this
    while( ($x) = shift @a ) {    # Broken
    while(  $x  = shift @a ) {    # Fixed
    ...
    
    my( $a, $b ) = ( shift @as, shift @bs );
    my( $a, $b ) = ( scalar shift @as, scalar shift @bs );
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others romping around the Monastery: (5)
As of 2024-04-25 10:12 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found