use strict; use warnings; my $s = "Hello, I am a perl/mysql programmer, but am self taught so I do not know all the awesome features Perl has, however, I am ok at it though, I guess."; my $s2; for (split /\s+/, $s) { $s2 .= "$_ "; last if length($s2) > 100; } print $s2; __END__ Hello, I am a perl/mysql programmer, but am self taught so I do not know all the awesome features Perl