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

array numerical name...

April 29, 2002 14:19
array numerical name...
Message ID:
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";


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

for ($b=0;$b<4;$b++) {
print @array$a[$b];
} Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About