Note 1: I wrote this as a quick hack one day that I got tired of writing ad hoc solutions for the same task. I am perfectly aware that the use of $`, $& and $' is generally discouraged for various reasons. In this case it seemed to me that it provided the simplest way to achieve what I wanted.
Note 2: I am perfectly aware that all in all this is not probably the most efficient way to do this, with potentially huge lists of parameters passing through recursive subs. All I can say is that it has worked excellently under all conditions of utilization I've needed. I typically use it like thus:
echo 'http://foo.org/{bar:baz}/gallery[1:100]/pic[1:12].jpg' | xstr |
+wget -i - -nH -x
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.