Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: Return a list or an iterator

by ysth (Canon)
on Apr 17, 2006 at 10:23 UTC ( [id://543797]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    sub foo {
        # ...
        wantarray ? @foo : sub { wantarray ? splice @foo : shift @foo } };
    }
    

Log In?
Username:
Password:

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

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

    No recent polls found