in reply to Re: File opening in ASP/Perlscript
in thread File opening in ASP/Perlscript
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.<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>
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 |