Beefy Boxes and Bandwidth Generously Provided by pair Networks kudra
Welcome to the Monastery
 
PerlMonks  

Re: Re: is this correct

by arhuman (Vicar)
on Feb 02, 2001 at 19:15 UTC ( [id://56086]=note: print w/replies, xml ) Need Help??

This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.


in reply to Re: is this correct
in thread is this correct

In case like this (a while loop around one or more files) the perl -ne is usually a good candidate...

Something like :
perl -ne 's/\t/ /g;print' file > file.tmp; mv file.tmp file;

Replies are listed 'Best First'.
Re: Re: Re: is this correct
by repson (Chaplain) on Feb 03, 2001 at 03:20 UTC
    To abstract it a little more

    perl -i.back -pe 's/\t/    /g' file

    The -i means copy original file to file.back and put the output of program in file. The -p is like -n but does while(<>){YOUR_CODE; print;} instead.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://56086]
help
Sections?
Information?
Find Nodes?
Leftovers?
    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.