"David Van Ginneken" schreef:

>         $fn =~ s/^\s*//g;
>         $fn =~ s/\s*$//g;
>         $val =~ s/^\s*"?//g if defined $val;
>         $val =~ s/"?\s*//g if defined $val;


The g-modifiers and the * quantifiers and the "? are either not right or
not necessary.

Alternative:

   s/^\s+//, s/\s+$// for $fn, $val; # alltrim

   s/^"(.*)"$/$1/ for $val; # val keeps any internal space at either end

-- 
Affijn, Ruud

"Gewoon is een tijger."


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to