Wednesday, February 13, 2002, 1:06:18 AM, Timothy Johnson wrote:
> Looking at the command-line thing more closely, something like this should
> work...
C:\>> perl -e "while(<>){s/good/bad/;print}" test.txt
or
perl -pi -e 's/good/bad/' test.txt
take a look in perldoc perlrun, there's all sorts of
command-line switches that can be used.
ta,
daniel
> but again, I don't use the command-line all that much.
> -----Original Message-----
> From: Booher Timothy B 1stLt AFRL/MNAC
> [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, February 12, 2002 4:37 PM
> To: [EMAIL PROTECTED]
> Subject: can't print input argument
> Hello - more trouble, I just can't seem to write a program that prints an
> argument it's passed:
> My script contains:
> #not working
> print "$ARGV\n";
> when I run this I get:
> c:\work.pl "this"
> c:\
> confused by this but also confused that I can't run anything from the
> command line in windows. Like
> c:\perl -e "s/Bad/Good/" test.txt
> or
> c:\perl -e 's/Bad/Good/" test.txt
> I have activePerl installed and my file attributes are fine . . .
> tim
--
Best Regards,
Daniel [EMAIL PROTECTED]
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]