Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much

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


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";

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


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

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (2)
As of 2015-10-10 06:14 GMT
Find Nodes?
    Voting Booth?

    Does Humor Belong in Programming?

    Results (254 votes), past polls