in reply to URL resolve (operations on path etc.)
haukex already solved it but this is the way I generally handle these. It lends itself to bulk changes; URI.
~>perl -MURI -E '$x = "http://a.com/a/b/c/d/e.json?x=1&y=2"; $y = "../ +../../"; say URI->new_abs($y,$x);' http://a.com/a/
|
---|
In Section
Seekers of Perl Wisdom