Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
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 avoiding work at the Monastery: (21)
As of 2016-02-11 17:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How many photographs, souvenirs, artworks, trophies or other decorative objects are displayed in your home?





    Results (377 votes), past polls