Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: shift in list context buggy? (scalar)

by tye (Cardinal)
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 scrutinizing the Monastery: (13)
As of 2014-08-21 18:38 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (142 votes), past polls