in reply to Modifying file input before displaying output
I haven't tested this. I don't know what your real data looks like. I have glossed over the fact you probably should be using HTML::Template or other templating for your output.#!/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' fo +r reading: $!"; while (<$fh>) { s/^\s+|\s+$/g; # strip whitespace $_ += $other_value; print "$_ "; }
Cheers - L~R
|
|---|