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 element of array of arrays

 



perlqs
New User

Jul 5, 2008, 12:11 AM

Post #1 of 3 (624 views)
Accessing element of array of arrays Can't Post

Hi. I'm a relatively new Perl programmer, and I'd like some help working with two arrays of arrays. I want to store a value from the first one, @AoA1, into the second one, @AoA2, without changing @AoA1. At first I was trying $AoA2[foo][bar] = $AoA1[foo][bar]. Now, I don't even really understand what's happening when I use the [][] indexing - I think I end up assigning a reference instead of a value - but the effect is that when I change that value of @AoA2 again it changes the corresponding value of @AoA1, which is not what I want. So how do I dereference the value I want from @AoA1?


KevinR
Veteran


Jul 5, 2008, 9:24 AM

Post #2 of 3 (615 views)
Re: [perlqs] Accessing element of array of arrays [In reply to] Can't Post

see tek-tips forum
-------------------------------------------------


PGScooter
stranger

Jul 5, 2008, 4:52 PM

Post #3 of 3 (601 views)
Re: [perlqs] Accessing element of array of arrays [In reply to] Can't Post

or perlmonks:
http://www.perlmonks.org/?node_id=695665
The more you teach me, the more I learn. The more I learn, the more I teach.

 
 


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

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