if you want to apply this regex to a single file, using the -i option
(in place editing) might be the quickest way for you.

ie.

perl -pe "tr/[a-e]/[1-5]/g" -i <filename>

Tor.


cute wrote:
> Now i create a temp file to store changed content.
> is there a simple way to change file content without creating temp
> files?
>
> ie:
>
> while(<>)
> {
>   tr/[a-e]/[1-5]/g
>   print TEMP, $_
> }
>
>
>   

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to