Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: A list assignment gotcha (updated)

by AnomalousMonk (Bishop)
on Jul 30, 2020 at 03:38 UTC ( #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
Node Status?
node history
Node Type: note [id://11120049]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (5)
As of 2021-01-20 13:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Notices?