in reply to Opening Excel from CGI Program

open(NEWFILE,"</tmp/$filename"); print <NEWFILE>; close(NEWFILE);
You're printing to a filehandle you've opened for reading. You want
open(NEWFILE,"</tmp/$filename"); while(<NEWFILE>) { print $_; } close(NEWFILE);

-derby

Update: Doh!

Replies are listed 'Best First'.
Re^2: Opening Excel from CGI Program
by davorg (Chancellor) on Nov 09, 2006 at 13:54 UTC
    open(NEWFILE,"</tmp/$filename"); print <NEWFILE>; close(NEWFILE);

    You're printing to a filehandle you've opened for reading.

    Look again. The code is reading from NEWFILE and writing to STDOUT.

    --
    <http://dave.org.uk>

    "The first rule of Perl club is you do not talk about Perl club."
    -- Chip Salzenberg