obdulio santana wrote:
use strict; use warnings; $_ = join '',<DATA>; s/^\s*\n(^.+\n)(?=^\s*\n)/print $1/egm;
<snip>
this one is not so bad or, is it?:-)
Actually it's rather similar to some of the solutions that were posted previously in this thread. http://www.mail-archive.com/beginners%40perl.org/msg92134.html
However, the s/// operator seems not to be the right tool. The m// operator in a while loop is better.
print $1 while /^\s*\n(^.+\n)(?=^\s*\n)/gm; -- Gunnar Hjalmarsson Email: http://www.gunnar.cc/cgi-bin/contact.pl -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/