my $i = 4; chop $string while $i -- && length $string; #### my $i = 4; 1 while $i -- && defined chop $string;