Да, забыл strip написать: sub strip { my ($string_ref, $length) = @_; my $str = substr($$string_ref, 0, $length); substr($$string_ref, 0, $length) = ''; } -- Severny Morskoy