use strict; use warnings; my $s = 'fred';; { no warnings; substr $s, 1,2,undef;; } print $s;;
Update: BrowserUk is correct ... I am not licensed to assess if one solution is more Perlish than another. The judge will instruct the jury to ignore that remark :)
In reply to Re: Use of uninitialized value in substr
by toolic
in thread Use of uninitialized value in substr
by BrowserUk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |