$text = 'text ist zu lang'; $text =~ s/^(.{3}).*$/$1/; print $text, "\n";