develooper Front page | perl.beginners | Postings from April 2002

array numerical name...

From:
Steven_Massey
Date:
April 29, 2002 14:19
Subject:
array numerical name...
Message ID:
OF7DF86023.5E15893B-ON80256BC8.00749923@amdahl.com
Hi all - should be simple - but I cannot figure it out

basically i want to name an array with  a subscript ie world0[0] and world1[0]   the 0/1 being a variable, i have tried to
 produce a simple example....

For any help - thanks..
----------------------------------------------------------
@fred = "one,two,three,four";

$a=0;

@array$a=split(/,/, @fred)

for ($b=0;$b<4;$b++) {
print @array$a[$b];
}




nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About