Help for this page
use strict; use warnings; ... my $pos = 0; substr $group, $pos, 1, "\n" while( ($pos = index( $group, "!", $pos ) +) > -1 and $count++ < 50000 ); print $group;