On 2011-02-06 16:52, mani kandan wrote:
$I=~s/^(Article\s+[0-9]+\s+[\A-Z_a-z]+\S)/\\subsection*{$1}/g;
print "$I";
That is weird advice in many ways:
1. A variable $I, what is it? Why capital?
2. No spaces around '=~', why?
3. You took out the m-modifier, why? (now it will only match (and
substitute) the first)
4. [\A-Z_a-z], why did you backslash the A? If \A ever becomes special,
that could change the meaning. Why is the underscore included?
5. You made the \S superfluous, why didn't you remove it?
6. Why did you quote $I for printing?
All in all quite ugly.
--
Ruud
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/