use strict; use warnings; my $s = 'fred';; { no warnings; substr $s, 1,2,undef;; } print $s;;