in reply to Re^2: Pearls (not really) of Perl programming
in thread Pearls (not really) of Perl programming

More regex solutions: (don't forget the s modifier)

($default_title) = $default_title =~ /(.{0,50})/s; $default_title =~ s/(?<=.{50}).*//s;
I'd also want to add
substr($default_title, 50, length($default_title), '');
and second you and the original isn't that bad.

ihb

See perltoc if you don't know which perldoc to read!
Read argumentation in its context!