Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re^3: regexp list return 5.6 vs 5.8

by almut (Canon)
on Jan 25, 2008 at 06:03 UTC ( [id://664222]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    my @x = qw(a b c);
    my @y = qw(d e);
    print scalar (@x, @y);       # prints "2" (number of elems in @y)
    
  2. or download this
    print scalar qw(a b c d e);  # prints "e" (last elem in list)
    
  3. or download this
    print scalar ((@x, @y)[0..@x+@y-1]);      # prints "e"
    print scalar sub {@_[0..$#_]}->(@x, @y);  # prints "e"
    

Log In?
Username:
Password:

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

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

    No recent polls found