Try this
my@arr=qw( Larrywall); print "\n @arr[0]"; $string=@arr[0]; $sub_str1=substr($string,0,4); $sub_str2=substr($string,5,2); print "\n $sub_str1"; print "\n $sub_str2";
In reply to Re^2: How to access each element in an array Perl
by PetreAdi
in thread How to access each element in an array Perl
by rammohan
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |