http://qs321.pair.com?node_id=204011


in reply to Do I need an array within an array

Greetings!!

You are almost there!!

Here's an array of (anonymous) arrays

use strict; use warnings; my $lang = 0; my @name = (qw/name nombre/); my @color = ( [qw/red yellow blue/], [qw/rojo amarillo azul/], ); print "$name[$lang]\n"; print "$color[$lang][2]\n";
-Daruma

Replies are listed 'Best First'.
Re: Re: Do I need an array within an array
by meetn2veg (Scribe) on Oct 09, 2002 at 19:58 UTC
    Daruma - I LOVE YOU!!!

    I finally managed to suss it out! I'll buy you a beer next time you around this neck of the woods!

    Although I'm new to Perl (self-tought over 13 months) arrays and hashed etc... have really stumped me, considering what I'm trying to do - ie: a multi-lingual site not only for visitors within the pages, but also for clients within an admin area, and in between there's a system for the client (who could have the admin area set to display any of 4 languages) to see what the visitor (who could be viewing the pages in any of 4 languages) has input in a form (also up to 4 languages).

    I don't realy love you Daruma, but you should be able to see why I'm soooo chuffed. I'd also like to say a huge 'Thanks' to you all for your light-speed replies. I will be looking into the other possibilities that have also been posted.

    Nice to know there are superb people out there willing to help out the likes of up-n-coming Jedi Webmasters.

    Thanks.

    I hope you're allowed to post 'Thank you' notes like this?!?