|
|
|
Your skill will accomplish what the force of many cannot |
|
| PerlMonks |
Things you think you'll never use.by redlemon (Hermit) |
| on Jan 21, 2005 at 15:25 UTC ( #424001=perlmeditation: print w/ replies, xml ) | Need Help?? |
|
You've read all the perldocs, tutorials and can quote verbatim from the Camel book. Even so you come across sections that don't make immediate sense or you'll think "I'm never going to use that!". Like in perlre: "What would I use that for?" Well, I came across a use yesterday. I find that B<some bold text> is easier to read than <b>some bold text</b>. Hence I wanted to use that on my website to make writing their web pages easier for my kids & wife. I didn't need the full POD syntax, so here it is: the (over)simplified one-line POD-2-HTML text marker.
It translates: to (I know that in this case the HTML version is actually more readable than the bracketed version, but I just wanted to show that it handles stacked markup.) Regex explanation: By using a hash lookup, this is easily expanded to include all kinds of translations.
Back to
Meditations
|
|
||||||||||||||||||||||||||||||