Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: Why does the first $c evaluate to the incremented value in [$c, $c += $_] ?

by vsespb (Chaplain)
on Mar 05, 2014 at 11:47 UTC ( #1077068=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    my $c = 2;
    my @a = ("$c", $c+=1);
    print "@a";
    
  2. or download this
    my $c = 2;
    my @a = ($c, $c+=1);
    print "@a";
    
  3. or download this
    my ($a, $b) = (shift, shift)
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1077068]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (1)
As of 2018-07-23 04:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    It has been suggested to rename Perl 6 in order to boost its marketing potential. Which name would you prefer?















    Results (459 votes). Check out past polls.

    Notices?