Doh, you're sooo right.

Thanks,

d

John W. Krahn <[EMAIL PROTECTED]> had this to say,

> Deb wrote:
> > 
> > Wait.  Using this construct, I can't seem to get the change to write out to
> > the file, like I can to stdout.
> > 
> > > > while (<IN>) {
> > >       if ( /^That_Text\s=\s2/ ) {
> > >          $_ .= $addText;
> > >        }else {
> > >          s/^This_Text.*$/That_Text = 2/;
> > >        }
> > >   You don't need the $_ since this is the default for regex searches and 
> > > replaces.
> > 
> > The line at ^shield remains untouched.  The other lines modify the file just fine.
> > 
> > Here's my code.
> > 
> > sub editConfSettings {
> > 
> >         open (IN,       "tmpconf") or die "cannot open for reading: $!\n";
> >         open (OUT,      "conf")    or die "cannot open for writing: $!\n";
>                      ^^^^^^^^^^^                    ^^^^^^^^^^^^^^^^
> You are opening "conf" for INPUT - you cannot write to it.
> 
>         open OUT, '>', 'conf' or die "cannot open for writing: $!\n";
> 
> 
> 
> John
> -- 
> use Perl;
> program
> fulfillment

-- 
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
          There are 010 types of people in the world:
       those who understand binary, and those who don't.
τΏτ   111,111,111 x 111,111,111 = 12,345,678,987,654,321 (decimal)
 ~ 







--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to