Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: How are arrays and lists different?

by dvergin (Monsignor)
on Mar 12, 2001 at 09:19 UTC ( #63753=note: print w/replies, xml ) Need Help??


in reply to How are arrays and lists different?
in thread array element seperators

Thanks, tye and tilly, for putting my attempt in the context of the larger discussion. (I did search around for precedent posts to cite but got only looong lists of hits that seemed to be about other issues.)

Tilly, I am particularly struck by the following, cribbed and expanded upon from your post:

sub ret_array { return @_; } sub ret_list { return @_[0..$#_]; } my @array = ('a','b','c'); print scalar ret_array('a','b','c'); # 3 print scalar ret_array(@array); # 3 print scalar ret_list('a','b','c'); # c print scalar ret_list(@array); # c

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://63753]
help
Chatterbox?
and monks are getting baked in the sun...

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (2)
As of 2017-02-21 06:38 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Before electricity was invented, what was the Electric Eel called?






    Results (307 votes). Check out past polls.