http://qs1969.pair.com?node_id=11121800


in reply to Re^6: What esteemed monks think about changes necessary/desirable in Perl 7 outside of OO staff
in thread What esteemed monks think about changes necessary/desirable in Perl 7 outside of OO staff

No elegant alternative. As I showed in the benchmark, this works fine:

sub splt{split" ",reverse((split" ",(reverse$x),1)[0]),1;};

To be honest, i all the years that I "do" Perl (since perl-4.016), I have never seen anyone using split to trim leading (or trailing) whitespace.


Enjoy, Have FUN! H.Merijn