mpapet has asked for the wisdom of the Perl Monks concerning the following question:
Order is important. The email file goes on the end. Question 1: What are other more convoluted ways of writing that command? I tried to pipe and it just didn't work. It should be obvious my STDIN-foo is weak. So... very... weak... My test code that doesn't work looks like this:/usr/lib/dovecot/deliver -f test@somedomain.com -d test@mailtask.dom < + demo.mail
Question 2: how do I write the open line to work like the command line version?use strict; open FH, "< ./demo.mail"; my @all = <FH>; close FH; my $stringified = ''; foreach (@all) { $stringified .= $_; } #print $stringified; close STDOUT; my $test = open (STDOUT, ' $stringified | /usr/lib/dovecot/deliver -f +test\@somedomain.com -d test\@mailtask.dom '); print $test;
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Newbie: Pipe/STDIN Clarification
by mrstlee (Beadle) on Nov 05, 2011 at 11:41 UTC | |
by graff (Chancellor) on Nov 05, 2011 at 13:57 UTC | |
by mrstlee (Beadle) on Nov 05, 2011 at 16:29 UTC | |
by mpapet (Novice) on Nov 05, 2011 at 13:54 UTC | |
by graff (Chancellor) on Nov 05, 2011 at 14:04 UTC | |
Re: Newbie: Pipe/STDIN Clarification
by Anonymous Monk on Nov 05, 2011 at 05:16 UTC | |
by graff (Chancellor) on Nov 05, 2011 at 13:41 UTC | |
Re: Newbie: Pipe/STDIN Clarification
by mrstlee (Beadle) on Nov 05, 2011 at 13:31 UTC |