in reply to Re: Removing multiple values
in thread Removing multiple values
Good suggestions, demerphq++. A small detail
my ($key, $value) = split(/s+/,$_); #i dont like naked splits.. personally...It's OK to not like this bare split, but you should be aware that your version is behaving differently if $_ has leading whitespace, so to write it long and correctly, do this:
Try it out and see the difference, this is documented in split as well.$_ = " key value"; my ($key, $value) = split(" ",$_); # note: this behaves differently my ($key, $value) = split(/ /,$_);
-- Hofmator
|
|---|