Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: What is the difference between $array[1] and @array[1]?

by morgon (Priest)
on Apr 07, 2009 at 14:21 UTC ( [id://756037]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    my @array = qw(a b c d e);
    my @slice = @array[0, 2, 4];
    print join "-", @slice;  # this produces "a-c-e"
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others rifling through the Monastery: (2)
As of 2025-01-15 04:56 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Which URL do you most often use to access this site?












    Results (46 votes). Check out past polls.