in reply to URL path shortening

What you need is the URI module. Funny thing is, I said exactly the same thing to someone else not more than two days ago in this thread: Using HTML templates.

As for your code, I can't decide whether it's clunky or not... the formatting make it hard to understand what's going on. Perltidy might come in handy for laying out your code in a more orthodox manner :) It looks like you might want a helper sub to factor out how you build your path components, but it hurts my brain to look at this for too long.


print@_{sort keys %_},$/if%_=split//,'= & *a?b:e\f/h^h!j+n,o@o;r$s-t%t#u'