Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re^2: Creating an outputfile and processing it at once

by sk (Curate)
on Jul 28, 2005 at 07:49 UTC ( [id://478868]=note: print w/replies, xml ) Need Help??


in reply to Re: Creating an outputfile and processing it at once
in thread Creating an outputfile and processing it at once

This runs the program twice unnecessarily ;)

Not sure if it is a big deal or not but not required

Update: umbra you mentioned that you are on windows and don't have access to tee. In such cases you can write your own tee. It is very simple.

# Program tee #!/usr/bin/perl -w die "Usage: tee outfile\n" unless @ARGV == 1; open(OUT,'>', $ARGV[0]) or die $!; shift; while (<>) { print OUT; print; } close (OUT) or die $!;

PS: I wasn't sure how to reply back to you with code as a /msg so decided to update this thread.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://478868]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others lurking in the Monastery: (7)
As of 2024-03-28 12:51 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found