At 06:37 -0700 9/24/03, Mark Wheeler wrote: >#!/usr/bin/perl -w >use strict; >print "Content-type: text/html\n\n"; >print "The contents of the file: <br><br>"; >open (DATA, "example.txt") || die ("Could not open file <br> $!"); >my @text = <DATA>; >print @text; >close (DATA); >exit;
If you're calling the script from Apache or another CGI you will not see the die message. Also, from Apache the execute bit will need to be set: chmod 775 thescript.pl How about? if (! open (DATA, "example.txt") { print "<P> Could not open file, $!\n"; die; } -- --> There are 10 kinds of people: those who understand binary, and those who don't <--