my $str =<<'EOS'; There once was a man from Nantucket, Who kept all his cash in a bucket. His daughter, named Nan, Ran off with a man. And as for the bucket, Nantucket. EOS sub shrink_in_place { for (my $i=0; $i