in reply to LWP::UserAgent with development website

replace
if (-f $file) { $fileContents = `cat $file`; print $fileContents; }
with
if (-f $file) { open (FH, "<$file"); print <FH>; }

Replies are listed 'Best First'.
Re^2: LWP::UserAgent with development website
by jdalbec (Deacon) on Sep 18, 2004 at 00:27 UTC
    if (-f $file) { open (FH, "<$file"); print <FH>; }
    That displays only the first line of the file. I think the OP wants to display the whole file. Did you mean print while <FH>;? Sorry, I didn't realize <> loads the whole file as an array in list context.