@t_arr2 = ("one", "two", "three");
push(@t_arr, \@t_arr2);
@t_arr2 = ("four", "five", "six");
push(@t_arr, \@t_arr2);
for $str1 ( @t_arr )
{
print "$str1->[0]\n";
print "$str1->[1]\n";
print "$str1->[2]\n";
}
####
@t_arr2 = ("one", "two", "three");
push(@t_arr, [@t_arr2]);
@t_arr2 = ("four", "five", "six");
push(@t_arr, [@t_arr2]);
for $str1 ( @t_arr )
{
print "$str1->[0]\n";
print "$str1->[1]\n";
print "$str1->[2]\n";
}
####
four
five
six
four
five
six
####
one
two
three
four
five
six
####
#!/usr/bin/perl -w
use strict;