how about if you want to back up the original file?
add .bak after the -pi:

#!/usr/bin/perl -pi.bak
y/\t/|/;

call it via convert < infile > outfile OR
convert inandoutfile

my 2c

Iain Wade wrote:
> 
> > Not bad though.. :-)  Try this on for size..
> >
> > #!/usr/bin/perl
> > while(<>){s/\t/|/g;print;}
> >
> > Invoke this as:
> >
> > convert < infile > outfile
> 
> #!/usr/bin/perl -pi
> s/\t/|/g;
> 
> Invoke this as:
> 
> tab2pipe filename.ext
> 
> all conversion is done inplace .. thanks to Charles Galpin for the idea...
> 
> --
> Iain Wade - Optus Internet
> Email: [EMAIL PROTECTED]
> 
> --
> To unsubscribe: mail [EMAIL PROTECTED] with "unsubscribe"
> as the Subject.

-- 

If a manager offers "constructive advice" and no-one is around to hear
it, 
    is he still an idiot?

Chris Dowling.
[EMAIL PROTECTED]
[EMAIL PROTECTED]


-- 
To unsubscribe: mail [EMAIL PROTECTED] with "unsubscribe"
as the Subject.

Reply via email to