>perl -Mstrict -Mwarnings -MData::Dump=dd my $line = "foo,bar\n"; substr($line, -3, 2, ''); dd $line; ^Z "foo,b\n"