#!perl use strict; use warnings; my $data = 'some random data to test this'; while ($data =~ m/^(.*)$/gm) { my $line = $1; print "<1>" . $line ."\n"; }