develooper Front page | perl.beginners | Postings from August 2009

one liner in Windows to replace string

Thread Next
From:
Tony Esposito
Date:
August 24, 2009 09:46
Subject:
one liner in Windows to replace string
Message ID:
263311.56951.qm@web24604.mail.ird.yahoo.com
perl -p -i.bak -e 's/CONSTANT/VARIABLE/' C:\test.txt

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 !!!


      
Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About