I'd change the second split to use delimiters other than /.
Good point, VSarkiss, but when using a different delimiter you have to write
split m|/|; # instead of split |/|;
I agree fully with your suggestions and like especially your point about making the comment. This solution was not mentioned elsewhere. A perl programmer should know that $_ (or $elem) is an alias for the actual element. Nevertheless overreading this is easy, so the comment is a good solution.
-- Hofmator
In reply to Re: Re: Do as I say. Not as I do
by Hofmator
in thread Do as I say. Not as I do
by davorg
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |