Re: Perl equivalent to unix script



[newsgroups trimmed, f'ups set]

Quoth "Mike" <mikedawg@xxxxxxxxx>:
Ok. . . Well, I'm sure here comes another dumb question. I'm fairly
handy with unix and unix scripting, however, I'm terrible at perl.

What I'm looking to do with a perl script is the equivalent of the
following unix (bash) script:

cat tempfile1 | sort > newfile2; rm tempfile1

I'm not completely comfortable with file handling in perl, and I think
it should be easy to do, but I've been unsuccessful in trying to do it.

perldoc -f open
"I/O Operators" in perlop
perldoc -f sort
perldoc -f print
perldoc -f unlink

Make an attempt to solve the problem yourself. If you fail, post what
you have, and we will help you fix it.

Ben

--
We do not stop playing because we grow old;
we grow old because we stop playing.
benmorrow@xxxxxxxxxxxxx
.



Relevant Pages