Can I add this line before the assignment ? Is there any other option ?#!c:\bin\perl use warnings; my $str="name"; my $index=12; my $s=substr($str,$index,1); print $s; __OUTPUT__ substr outside of string at - line 3. Use of uninitialized value in print at - line 4.
Thanks -kullsexit if(length($str)< $index);
In reply to substr outside of string by kulls
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |