#!/usr/bin/perl -T use strict; use warnings; use CGI; my $q = CGI->new(); print $q->header; my $other_value = 42; open(my $fh, '<', 'input.file') or die "Unable to open 'input.file' for reading: $!"; while (<$fh>) { s/^\s+|\s+$/g; # strip whitespace $_ += $other_value; print "$_ "; }