in reply to Newbie: Pipe/STDIN Clarification
my $stringified = ''; { #Go into local slurp mode .. local $/=undef; open FH, "< ./demo.mail"; $stringified = <FH>; close FH; open (CMD_OUT, "/usr/lib/dovecot/deliver -f +test\@somedomain.com -d test\@mailtask.dom $stringified"|); my $test = <CMD_OUT>; print $test; close CMD_OUT; }
There are other ways of course. This is perl after all.my $test = `/usr/lib/dovecot/deliver -f +test\@somedomain.com -d test\@mailtask.dom $stringified`;
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Newbie: Pipe/STDIN Clarification
by graff (Chancellor) on Nov 05, 2011 at 13:57 UTC | |
by mrstlee (Beadle) on Nov 05, 2011 at 16:29 UTC | |
Re^2: Newbie: Pipe/STDIN Clarification
by mpapet (Novice) on Nov 05, 2011 at 13:54 UTC | |
by graff (Chancellor) on Nov 05, 2011 at 14:04 UTC |