Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 8 Apr 2007 20:50:14 +0300
From:      Giorgos Keramidas <keramida@ceid.upatras.gr>
To:        Garrett Cooper <youshi10@u.washington.edu>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: script perl with sed command
Message-ID:  <20070408175014.GA1672@kobe.laptop>
In-Reply-To: <46191814.5080807@u.washington.edu>
References:  <4617B954.7010507@steelbox.org> <20070407171120.GA70957@kobe.laptop> <4618B887.4030709@steelbox.org> <46191814.5080807@u.washington.edu>

next in thread | previous in thread | raw e-mail | index | archive | help
On 2007-04-08 09:28, Garrett Cooper <youshi10@u.washington.edu> wrote:
> Olivier Regnier wrote:
> The file has to exist that you're trying to modify, otherwise it'll give
> up :). Permissions issue?
> 
> Better to do that section may be:
> 
>      my $tmpsupfile;
>      my $supfile = "/etc/standard-supfile";
>      my $newhost = "cvsup.fr.freebsd.org";
> 
>      if (!defined($supfile) || !defined($newhost)) {
>          return undef;
>      }
> 
>      $tmpsupfile = new File::Temp();
>      die "$!" unless(defined($tmpsupfile);
>      open(SUP, "$supfile") or die "$!";

Ah, much better, thanks :)




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20070408175014.GA1672>