Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options

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 all is quiet...

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (4)
As of 2017-03-29 02:42 GMT
Find Nodes?
    Voting Booth?
    Should Pluto Get Its Planethood Back?

    Results (343 votes). Check out past polls.