http://www.perlmonks.org?node_id=912493


in reply to Re: url and arrays
in thread url and arrays

URL's can be tricky. Maybe your case is fairly trivial, but why not use a tool known to work? URI::Split

Not only is it known to work, but it is intended to continue working, for the OP's specific intended purpose. When found not to work, it shall be fixed. It's the right solution today and tomorrow. That's the textbook reason for reusing code like this.

--Dave