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

Re^3: regexp list return 5.6 vs 5.8

by hipowls (Curate)
on Jan 24, 2008 at 09:34 UTC ( [id://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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://663969]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others exploiting the Monastery: (6)
As of 2024-04-24 06:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found