"R. Joseph Newton" wrote:
>
> "John W. Krahn" wrote:
>
> > open() returns 'true' if the file was opened or 'false' if the file was
> > not opened.
>
> Not exactly. At least not on my Perl installation [5.6.1 on W2K]. open
> returns 1 on success, but does not return a value on failure.
perldoc
William Olbrys wrote:
>
>
> The problem is my search and replace does not work. I'm new to perl and
> I find the perlre syntax very confusing. I simply want to replace one
> word(a string) with a much bigger string! How are files accessed
> differently than regular strings? I don't receive an
"John W. Krahn" wrote:
> open() returns 'true' if the file was opened or 'false' if the file was
> not opened.
Not exactly. At least not on my Perl installation [5.6.1 on W2K]. open returns 1 on
success, but does not return a value on failure.
#!/usr/bin/perl -w
use strict;
use warnings;
my
Corrections
"R. Joseph Newton" wrote:
>
> What do you think you are dong here? As far as I know, open is a void function.
I was forgetting that it returns a true value, that can be tested by
open FILE, "< fileName" or fail_statement;
>
> perldoc -f open
>
> > $index = open (TEXT, "../htdocs/gam
William Olbrys wrote:
> I've started writing a simple perl script for a web site so I can update
> it more quickly, but as I have a bit of a problem.
>
> Here is what I have:
>
> #!c:/Perl/bin/perl
> print "Content-type: text/html\n\n";
> $game = open (TEXT, "../htdocs/gameplow/game");
What do yo
William Olbrys wrote:
>
> I've started writing a simple perl script for a web site so I can update
> it more quickly, but as I have a bit of a problem.
>
> Here is what I have:
>
> #!c:/Perl/bin/perl
You should enable warnings and strictures when developing your program.
use warnings;
use stri