Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re^3: regexp list return 5.6 vs 5.8

by hipowls (Curate)
on Jan 24, 2008 at 09:34 UTC ( #663969=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    sub test {
        my @rv = $_[0] =~ /^([0-9]+)$/;
        print "<<@rv>>\n";
        return @rv[ 0 .. $#rv ];
    }
    
  2. or download this
    <<>>
    [[]
    ...
    [123]
    <<123>>
    [123]
    
  3. or download this
    sub test {
        my @rv = $_[0] =~ /^([0-9]+)$/;
    ...
        return wantarray? @rv: $rv[-1];
    }
    
  4. or download this
    michael$ perl t.pl
    <<>>
    ...
    [123]
    <<123>>
    [123]
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (4)
As of 2020-10-20 07:17 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My favourite web site is:












    Results (209 votes). Check out past polls.

    Notices?