freelanceprogrammers.org Forum Index » Perl
Redirecting Standard Output
Joined: 28 Feb 2002
Posts: 5
Redirecting Standard Output
Hi everybody! (Listens to echo...)
Just a quicky. What`s a way to redirect standard output, (AKA STDOUT,)
to an output file?
I believe I used to know how to do that. I can`t find a decent and
simple way of doing that in the manuals.
Joined: 21 May 2004
Posts: 44
Redirecting Standard Output
>>>>> "ubercat" == ubercat <no_reply@yahoogroups.com> writes:
ubercat> Just a quicky. What`s a way to redirect standard output, (AKA STDOUT,)
ubercat> to an output file?
open STDOUT, ">outputfile" or die;
ubercat> I believe I used to know how to do that. I can`t find a decent and
ubercat> simple way of doing that in the manuals.
what part of "perldoc -f open" is unclear to you?
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn@...> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!
Joined: 21 Apr 2005
Posts: 3
Redirecting Standard Output
Hai,
try this. I have done with a example.
#!/usr/local/bin/perl
open(STDOUT,">test.txt") || die "Cant open file";
($_="kkvvttuu bbooppuuiiffss qqffssmm iibbddllffss")
=~y~b-v~a-z~s; print
The STDOUT, which is default standard output prints to
the screen. But now it will print to the file text.txt
--prasanna.k
--- ubercat <no_reply@yahoogroups.com> wrote:
>
> Hi everybody! (Listens to echo...)
>
> Just a quicky. What`s a way to redirect standard
> output, (AKA STDOUT,)
> to an output file?
>
> I believe I used to know how to do that. I can`t
> find a decent and
> simple way of doing that in the manuals.
>
>
>
>
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
Joined: 28 Feb 2002
Posts: 5
Redirecting Standard Output
Thanks man! I tried something like that before, and I do get my
program`s standard out to the file. The SQL server is still
printing its own standard output though. I`ll see if I can find a
way to catch that.
--- In perl_official@yahoogroups.com, k prasanna <kprasanna_79@y...>
wrote:
>
> Hai,
> try this. I have done with a example.
> #!/usr/local/bin/perl
> open(STDOUT,">test.txt") || die "Cant open file";
> ($_="kkvvttuu bbooppuuiiffss qqffssmm iibbddllffss")
> =~y~b-v~a-z~s; print
>
> The STDOUT, which is default standard output prints to
> the screen. But now it will print to the file text.txt
>
> --prasanna.k
>
> --- ubercat <no_reply@yahoogroups.com> wrote:
> >
> > Hi everybody! (Listens to echo...)
> >
> > Just a quicky. What`s a way to redirect standard
> > output, (AKA STDOUT,)
> > to an output file?
> >
> > I believe I used to know how to do that. I can`t
> > find a decent and
> > simple way of doing that in the manuals.
> >
> >
> >
> >
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam? Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com
All times are GMT
Page 1 of 1
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Freelace Website Designer - Customer web design and software building.
Booking Calendar - reservation calendar script
Land Surveying - total station instruments and equipments
China Wholesale - Electronics Products
Character Studio - Tutorials and Help
Booking Calendar - reservation calendar script
Land Surveying - total station instruments and equipments
China Wholesale - Electronics Products
Character Studio - Tutorials and Help







