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

Re: What should be returned in scalar context?

by Aristotle (Chancellor)
on Dec 03, 2003 at 07:08 UTC ( [id://311848]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    sub foo {
        if (1 != @_) {
    ...
        # body of foo here.
        return $whatever;
    }
    
  2. or download this
    sub foo {
        ( map {
            # body of foo here.
        } @_ )[ 0 .. $#_ ];
    }
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others about the Monastery: (3)
As of 2024-04-19 22:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found