Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: Do I need an array within an array

by Daruma (Curate)
on Oct 09, 2002 at 18:54 UTC ( #204011=note: print w/ replies, xml ) Need Help??


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


Comment on Re: Do I need an array within an array
Download Code
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?!?

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (6)
As of 2014-09-19 07:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (132 votes), past polls