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

Re: temporary file

by dree (Monsignor)
on May 19, 2002 at 13:00 UTC ( #167653=note: print w/ replies, xml ) Need Help??


in reply to temporary file

Hello! :)

You can use pipes | to send a program output to (another) program input.
For example to send an attach with sendmail via CGI, without using a temporary file to mimencode the attach, you can pipe the output from cat to the input of mimencode:
#code from a sub unless (open(MAIL, "| $sendmail ")) { return 0 }; my $attach=$q->param('upfile'); my $path = $q->tmpFileName($attach); open (ATTACH,"cat $path | mimencode |") or return 0; [cut] close ATTACH; close MAIL;

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (4)
As of 2016-07-02 08:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What is your favorite alternate name for a (specific) keyboard key?


















    Results (19 votes). Check out past polls.