CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Beginner:
Accessing an array

 



davidbj
Novice

Aug 25, 2011, 2:15 AM

Post #1 of 2 (1165 views)
Accessing an array Can't Post

Two days ago, one friend makes me an answer:

What's the difference between accessing an array element with $items[$index] and @items[$index]?

And, i'm not sure.

Anyone can help me?


shawnhcorey
Enthusiast


Aug 25, 2011, 5:14 AM

Post #2 of 2 (1154 views)
Re: [davidbj] Accessing an array [In reply to] Can't Post

The first is a scalar, the second, a slice. That is, it's a list of one element. See `perldoc perldata` and search for the section /Slices/.

__END__

I love Perl; it's the only language where you can bless your thingy.

Perl documentation is available at perldoc.perl.org. The list of standard modules and pragmatics is available in perlmodlib.

Get Markup Help. Please note the markup tag of "code".

 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives