Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: A list assignment gotcha (updated)

by AnomalousMonk (Archbishop)
on Jul 30, 2020 at 03:38 UTC ( [id://11120049]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    c:\@Work\Perl\monks>perl -wMstrict -le
    "my ($x, $y, $z) = (30, 40, 50);
    ...
    Useless use of private variable in void context at -e line 1.
    Useless use of private variable in void context at -e line 1.
    30, 40, 55
    
  2. or download this
    c:\@Work\Perl\monks>perl -wMstrict -le
    "my @ra = (30, 40, 50);
    ...
     print qq{@ra};
    "
    33 44 55
    
  3. or download this
    c:\@Work\Perl\monks>perl -wMstrict -le
    "use List::MoreUtils qw(pairwise);
    ...
     print qq{@rc};
    "
    33 44 55
    
  4. or download this
    c:\@Work\Perl\monks>perl -wMstrict -le
    "use List::MoreUtils qw(pairwise);
    ...
     print qq{@ra};
    "
    33 44 55
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11120049]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chanting in the Monastery: (2)
As of 2024-04-20 04:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found