This is why I hate Perl.
sub trim
{
{
return undef if not @_;
my @ret = map { $_ ||= ”; /^\s*(.*?)\s*$/s; $1 } @_;
return wantarray ? @ret : $ret[0];
my @ret = map { $_ ||= ”; /^\s*(.*?)\s*$/s; $1 } @_;
return wantarray ? @ret : $ret[0];
}
Do you see the bug? Nor do I.
Leave a Reply