Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: shift in list context buggy? (scalar)

by tye (Sage)
on Nov 09, 2013 at 14:32 UTC ( #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
Node Status?
node history
Node Type: note [id://1061828]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (6)
As of 2016-09-26 19:06 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Extraterrestrials haven't visited the Earth yet because:







    Results (489 votes). Check out past polls.