in reply to Re: How to access each element in an array Perl
in thread How to access each element in an array Perl
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";
|
|---|