Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: Returning lists vs arrays

by OM_Zen (Scribe)
on Jan 20, 2003 at 16:51 UTC ( #228392=note: print w/replies, xml ) Need Help??


in reply to Returning lists vs arrays

Hi,

The list is not aplaceholder ,just a set of values and for returning a set of values , an array or an arrayref is better than a list and any fuction returns a set of variable values which are not constants and hence an array is better and mostly used than list
sub list { return(1,2); }
is not often used

sub arrays { @A = (1,2); return (\@A); }
is something often to use in sub

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (3)
As of 2022-09-30 03:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I prefer my indexes to start at:




    Results (125 votes). Check out past polls.

    Notices?