for my $line (split /\n/, $content){ # Insert your code here }