in reply to splitting data into multiple arrays?

It would be easier to work with an "array of arrays", rather than 4 separate arrays.
my $s=q|Tom.Dog.Ben.Cat|; my @array; for (split /\./,$s){ push @array,[$_] } # Created a 2-d array containing: # [0][0]=Tom # [1][0]=Dog # [2][0]=Ben # [3][0]=Cat print qq| $array[2][0];\n|; # Prints "Ben;"

     Syntactic sugar causes cancer of the semicolon.        --Alan Perlis