~ /$db_name/); # which is the same
as above seeing it is still using $_ in the background
but no dice...
could someone kindle point me in the right direction?
regards
-Ron
> -Original Message-
> From: Michael R. Wolf [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, January
[EMAIL PROTECTED] (Ronald Yacketta) writes:
> This works great with one exception... the two values in the sed need to be
> passed into the script...
>
> IE:
> changedbsid.pl OLDSID NEWSID filename(s)
>
> could be ran against 1 or more files at a time.
>
> I havethis which works like a champ o
[EMAIL PROTECTED] (Michael R. Wolf) writes:
> Other alternatives include
> #! /usr/bin/perl -w -i
> #! /usr/bin/perl -w -i .bak
> $^I = undef;
Oops! May have been misleading. Here's commentary on
alternatives.
$^I = ''; # in-place, but no backup
$^I = '.bak'; # in-place, with backu
ay, January 09, 2002 11:50
> To: [EMAIL PROTECTED]
> Cc: Yacketta, Ronald
> Subject: Re: Inline file edit
>
>
> "Yacketta, Ronald" <[EMAIL PROTECTED]> writes:
>
> > Would I be able to use this inline? That is within a perl
> > script itself? If so, migh
"Yacketta, Ronald" <[EMAIL PROTECTED]> writes:
> Would I be able to use this inline? That is within a perl
> script itself? If so, might you provide an example?
If you wanted to make a stand-alone perl script of it, it
would look something like this.
#! /usr/bin/perl -w
$^I = ".bak";
while(<>
Ronald Yacketta wrote:
>
> From: [EMAIL PROTECTED]
> >
> > Look at the -i flag. It takes an optional argument, but it sounds like
> > you don't want to keep a backup so use it without the arg. Think about
> > it carefully. And test
> > **VERY** carefully. If you get your code wrong, you've
>
]
Subject: Re: Inline file edit
[EMAIL PROTECTED] (Ronald Yacketta) writes:
> Folks,
>
> looking for a clean way to change a value in a file on the fly before
> it is processed (ran). I have a perl script that kicks off several
> resource scripts (.scr) that are NOT a valid shell
[EMAIL PROTECTED] (Ronald Yacketta) writes:
> Folks,
>
> looking for a clean way to change a value in a file on the fly before it is
> processed (ran).
> I have a perl script that kicks off several resource scripts (.scr) that are
> NOT a valid shell script and can not be ran from the command li
Folks,
looking for a clean way to change a value in a file on the fly before it is
processed (ran).
I have a perl script that kicks off several resource scripts (.scr) that are
NOT a valid shell script and can not be ran from the command line alone. I
need a way to modify these .scr scripts on th