my $cnt = 1; while ($out =~ /\G(.+)\n?|\G\n/g) { print "$cnt: $1\n"; $cnt++; }