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

Re: Scalars, Lists, and Arrays

by kha0z (Scribe)
on Apr 13, 2001 at 23:37 UTC ( #72455=note: print w/replies, xml ) Need Help??


in reply to Scalars, Lists, and Arrays

I found Figure 1-1 on page 11 of the Camel book (3rd Ed.) to give a nice visual explanation on arrays and associative arrays. It aslo helps to see the containment of scalar values within such arrays.

Good Hunting,
kha0z

Replies are listed 'Best First'.
Re^2: Scalars, Lists, and Arrays
by agadabanka (Initiate) on May 02, 2009 at 23:44 UTC
    yet another observation: perl arrays and lists are different in the sense that enclosing a ( ) around a bunch of numbers will concatenate them when used under a comma operator, while when used under a [ ] they retain their identity. anything like: my @data = ( @xvalues, @yvalues ) concatenates xvalues and yvalues. if xvalues/yvalues is an array then they get concatenated. however if they are lists [ ], they retain their identity.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://72455]
help
Chatterbox?
[Discipulus]: problem scrolling even main page..;=(
[LanX]: holli -> Good Intentions: Wikisyntax for the Monastery
[LanX]: monklinks are automatically converted ...
[LanX]: On another node, I just saw yesterday that the everything engine supports auto-paragraph whithout the need to type <p>
LanX i.e. the newest everything engine
[holli]: nice. i never thought of hosting a script on the site

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (7)
As of 2017-11-20 19:11 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    In order to be able to say "I know Perl", you must have:













    Results (291 votes). Check out past polls.

    Notices?