laziness, impatience, and hubris PerlMonks

### Comment on

 Need Help??

Thanks for the help everyone, I've also found you can write it like this as well:

while ( <code goes here> ) {}
[download]

The important but being that there's nothing in the {}. This gives us the original one-liner broken up to this:

#!/usr/bin/perl
my $string = 'abc abc abc \textit{abc abc} abc \textit{abc abc \textbf +{abc \textbf{abc abc} abc} abc} abc.'; while ($string =~ s/\\text(i|b)[tf]\{([^{}]*)\}/<$1>$2<\/$1>/g) {} print$string;
[download]

Or you could take out the {} and add a 0, X, or whatever in front of the while (...)

In reply to Re^3: Balance Change by MCS
in thread Balance Change by Anonymous Monk

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":

• 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.
• Posts may use any of the Perl Monks Approved HTML tags:
a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, 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, 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?

Create A New User
Chatterbox?
 [holli]: I got into a fight yesterday and won. [holli]: No, that's not true. I started it. [holli]: I was company to my mother, bringing her to the therapy she has to take. There was another so called therapist outside smoking. We engaged in a talk with her and he turned out to be one of these lunatics telling people when they are sick it's their own [holli]: fault for not thinking positively enough. [LanX]: did he seriously hurt his fist at your nose in the end? LanX .oO(positively thought)

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (6)
As of 2017-12-13 17:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
Voting Booth?
What programming language do you hate the most?

Results (373 votes). Check out past polls.

Notices?