Re: Perl equivalent to unix script
- From: Ben Morrow <benmorrow@xxxxxxxxxxxxx>
- Date: Mon, 30 Oct 2006 18:13:02 +0000
[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
.
- Follow-Ups:
- Re: Perl equivalent to unix script
- From: Mumia W. (reading news)
- Re: Perl equivalent to unix script
- Prev by Date: Re: Interesting behaviour with lexical variable
- Next by Date: Re: Interesting behaviour with lexical variable
- Previous by thread: Re: Interesting behaviour with lexical variable
- Next by thread: Re: Perl equivalent to unix script
- Index(es):
Relevant Pages
|