Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW

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?

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

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (4)
As of 2021-01-24 13:50 GMT
Find Nodes?
    Voting Booth?