Syntactic Confectionery Delight | |
PerlMonks |
Re^2: Trimming whitespaces methodsby lodin (Hermit) |
on Jun 30, 2008 at 17:02 UTC ( [id://694777]=note: print w/replies, xml ) | Need Help?? |
In order for the code to be truly equivalent the s modifier should be used on the substitution or a newline may break it. I assume you added the \S in the pattern as an improvement, but it should perhaps be noted that it has the effect of leaving a line of only whitespaces untouched, whereas the other ways don't. lodin
In Section
Seekers of Perl Wisdom
|
|