in reply to Split file, first 30 lines only

If on unix, you may go for :
for my $line (`head -30 $fullfile`)
instead of
for my $line (split qr/\'\n'/, get($fullfile))

Replies are listed 'Best First'.
Re^2: Split file, first 30 lines only
by marto (Cardinal) on Feb 28, 2017 at 09:19 UTC
    for my $line (`head -30 $fullfile`)

    Consider that not every OS has the head command, this suggested route of using backticks to run a system command isn't portable.

      That's correct. That is why I said "If on unix".

        I don't see a logical argument for suggesting backticks to a system command, when safer, portable options exist.