in reply to Re: File opening in ASP/Perlscript
in thread File opening in ASP/Perlscript

So how is that any better than the following?
<SCRIPT language="PerlScript"> use Win32::Script qw/WScript/; my $content = do { local $/; my $fh; open $fh, '<', 'a.txt' ? <$fh> : "Couldn't open a.txt: $!;" }; $window->document->write($content); </SCRIPT>
In fact I dare say it's worse - you were spawning an external process to read the file. There's sometimes something to be said for the brevity of qx{cat a.txt}, but you even gave up on that.

Makeshifts last the longest.

Replies are listed 'Best First'.
Re: Re^2: File opening in ASP/Perlscript
by chunlou (Curate) on Jul 28, 2003 at 01:58 UTC
    Whatever works is fine by me. I don't have any preference.