Conserving memory - was SPUG: Fw: greetings
Colin Meyer
cmeyer at helvella.org
Sun Oct 21 14:38:01 CDT 2001
On Sun, Oct 21, 2001 at 05:08:48AM -0700, Matt Tucker wrote:
> -- "Tim Maher/CONSULTIX" <tim at consultix-inc.com> spake thusly:
>
> >> or should I be using:
> >>
> >> open(FH, "<templates/RealTop.htm");
> >> print "Content-Type: text/html\n\n";
> >> while ($line = <FH>) {
> >> print "$line\n";
>
> This should be:
>
> print $line;
>
> to avoid getting doubled newlines. But then, no-one's actually going to
> write this code anyway, when a simple:
>
> system qw(cat templates/RealTop.htm);
>
> will do.
Out of curiosity, does this work on Windows? (I don't have a windows box
within convenience to test on.)
The 'perldoc -f system' page says that Perl forks before executing the
requested command. Does the Windows Perl's system execute the commands
without forking?
Also, is there a 'cat' on windows?
Have fun,
-C.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
POST TO: spug-list at pm.org PROBLEMS: owner-spug-list at pm.org
Subscriptions; Email to majordomo at pm.org: ACTION LIST EMAIL
Replace ACTION by subscribe or unsubscribe, EMAIL by your Email-address
For daily traffic, use spug-list for LIST ; for weekly, spug-list-digest
Seattle Perl Users Group (SPUG) Home Page: http://zipcon.net/spug/
More information about the spug-list
mailing list