in reply to Silencing errors in a php script using perl nd pipes.
Native Bourne shell:
#!/bin/sh exec ./home/bevs/bin/email >/dev/null 2>&1
Bourne shell via Perl:
#!/usr/bin/perl exec './home/bevs/bin/email >/dev/null 2>&1'; die;
Native Perl:
#!/usr/bin/perl use strict; use warnings; use IPC::Open3 qw( open3 ); open(my $fr_chld, '>', '/dev/null') or die; my $pid = open3(\*STDIN, $fr_chld, $fr_chld, './home/bevs/bin/email'); waitpid($pid, 0) or die;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Silencing errors in a php script using perl nd pipes.
by Thorney (Initiate) on Jun 20, 2008 at 07:53 UTC | |
by ikegami (Patriarch) on Jun 20, 2008 at 07:58 UTC | |
by Thorney (Initiate) on Jun 20, 2008 at 13:03 UTC | |
by ikegami (Patriarch) on Jun 20, 2008 at 17:45 UTC |