http://www.perlmonks.org?node_id=1193193

Nansh has asked for the wisdom of the Perl Monks concerning the following question:

Hi, I have file like this

Eg: I have a Red car

I love Red car

<p But I have a lot of affection with car

#!usr/bin/perl open(DAT,"something/something/something"); while(<DAT>) { $_=~ s/(.*)/Red car/g; print DAT $_; }
I want to Substitute whole file with Red car Thank you