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 ( #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 surveying the Monastery: (6)
As of 2016-06-30 16:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My preferred method of making French fries (chips) is in a ...











    Results (396 votes). Check out past polls.