> -----Original Message-----
> From: Tony Esposito [mailto:[email protected]]
> Sent: Monday, August 24, 2009 10:46
> To: Beginners Perl
> Cc: [email protected]
> Subject: one liner in Windows to replace string
>
> perl -p -i.bak -e 's/CONSTANT/VARIABLE/' C:\test.txt
>
I created the file and ran the one liner. Made the changes as
expected. Created the back up,etc.
Running as 5.8.9 build 825 under XP SP 1
If you have any questions and/or problems, please let me know.
Thanks.
Wags ;)
David R. Wagner
Senior Programmer Analyst
FedEx Freight Systems
1.719.484.2097 Tel
1.719.484.2419 Fax
1.408.623.5963 Cell
http://fedex.com/us
> Trying to replace a string with this one line perl ... in
> Windows it does not seem to work ...
>
> File test.txt contents is ...
>
> CONSTANT 100
> CONSTANT 200
>
> nothing changes ... acts as if it does not 'see' the CONSTANT string.
>
> Help because it looks like it should work !!!
>
>
>
>
--
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
http://learn.perl.org/