Hi,

we keep receiving these messages when posting to beginners@perl.org. Can you
please unsubscribe lel...@claimspages.com from it?

Regards,

-- Shlomi Fish

-- 
-----------------------------------------------------------------
Shlomi Fish       http://www.shlomifish.org/
My Aphorisms - http://www.shlomifish.org/humour.html

Chuck Norris can make the statement “This statement is false.” a true one.

Please reply to list if it's a mailing list post - http://shlom.in/reply .
--- Begin Message ---
Valid fax destination information could not be found
in your mail message.  The message was discarded.

Examples of properly formatted messages:

  /name=frank/fax=3217...@faxgate.company.com
  Frank Smith /name=frank/fax=3217453/ <faxg...@company.com>

The original message information follows:

Received: from mx.npci.net ([10.0.1.60]) by mail.claimspages.com with
Microsoft SMTPSVC(5.0.2195.7381);
         Wed, 20 Jul 2011 05:43:48 -0400
Received: from localhost (unknown [127.0.0.1])
        by mx.npci.net (Postfix) with ESMTP id 9D8A22E463E
        for <lel...@claimspages.com>; Wed, 20 Jul 2011 09:43:48 +0000 (UTC)
X-Virus-Scanned: amavisd-new at nationwide.net, cpdev20.com, claimspages.com
Received: from mx.npci.net ([127.0.0.1])
        by localhost (del-mx1.nationwide.net [127.0.0.1]) (amavisd-new, port
10024)
        with ESMTP id xErkade46R6G for <lel...@claimspages.com>;
        Wed, 20 Jul 2011 05:43:43 -0400 (EDT)
Received: from x6.develooper.com (x6.develooper.com [207.171.7.86])
        by mx.npci.net (Postfix) with ESMTP id 51DD42E4561
        for <lel...@claimspages.com>; Wed, 20 Jul 2011 05:43:43 -0400 (EDT)
Received: from lists-nntp.develooper.com (localhost.localdomain [127.0.0.1])
        by x6.develooper.com (Postfix) with SMTP id 1E86017ADD
        for <lel...@claimspages.com>; Wed, 20 Jul 2011 02:43:38 -0700 (PDT)
Received: (qmail 5952 invoked by uid 514); 20 Jul 2011 09:43:14 -0000
Mailing-List: contact beginners-h...@perl.org; run by ezmlm
Precedence: bulk
List-Post: <mailto:beginners@perl.org>
List-Help: <mailto:beginners-h...@perl.org>
List-Unsubscribe: <mailto:beginners-unsubscr...@perl.org>
List-Subscribe: <mailto:beginners-subscr...@perl.org>
List-Id: <beginners.perl.org>
Delivered-To: mailing list beginners@perl.org
Received: (qmail 5937 invoked from network); 20 Jul 2011 09:43:14 -0000
Received: from x1.develooper.com (207.171.7.70)
  by x6.develooper.com with SMTP; 20 Jul 2011 09:43:14 -0000
Received: (qmail 24229 invoked by uid 225); 20 Jul 2011 09:43:13 -0000
Delivered-To: beginners@perl.org
Received: (qmail 24225 invoked by alias); 20 Jul 2011 09:43:13 -0000
X-Spam-Check-By: la.mx.develooper.com
Received: from gateway16.websitewelcome.com (HELO gateway16.websitewelcome.com)
 (69.56.162.7)
    by la.mx.develooper.com (qpsmtpd/0.28) with SMTP; Wed, 20 Jul 2011
02:43:07 -0700
Received: (qmail 22012 invoked from network); 20 Jul 2011 09:41:24 -0000
Received: from gator245.hostgator.com (74.53.88.50)
  by gateway16.websitewelcome.com with SMTP; 20 Jul 2011 09:41:24 -0000
Received: from [79.183.124.234] (port=50803 helo=telaviv1.shlomifish.org)
        by gator245.hostgator.com with esmtpa (Exim 4.69)
        (envelope-from <shlo...@shlomifish.org>)
        id 1QjTIy-00018D-Rf; Wed, 20 Jul 2011 04:43:01 -0500
Received: from telaviv1.shlomifish.org (telaviv1.shlomifish.org [127.0.0.1])
        by telaviv1.shlomifish.org (Postfix) with ESMTP id D202911BD47;
        Wed, 20 Jul 2011 12:42:45 +0300 (IDT)
Date: Wed, 20 Jul 2011 12:42:45 +0300
From: Shlomi Fish <shlo...@shlomifish.org>
To: Jim Gibson <jimsgib...@gmail.com>
Cc: <beginners@perl.org>
Subject: Re: redirect system command STDER
Message-ID: <20110720124245.0192b...@telaviv1.shlomifish.org>
In-Reply-To: <ca4b5fb6.13520%jimsgib...@gmail.com>
References: 
<CAKp6Vayo4JsCnPk2LkUgJ8EQ3wmNEqFC5LrNqkk9m8fkhsa=f...@mail.gmail.com
>
        <ca4b5fb6.13520%jimsgib...@gmail.com>
X-Mailer: Claws Mail 3.7.9 (GTK+ 2.24.5; i586-mageia-linux-gnu)
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
X-AntiAbuse: This header was added to track abuse, please include it with
any abuse report
X-AntiAbuse: Primary Hostname - gator245.hostgator.com
X-AntiAbuse: Original Domain - perl.org
X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12]
X-AntiAbuse: Sender Address Domain - shlomifish.org
X-BWhitelist: no
X-Source: 
X-Source-Args: 
X-Source-Dir: 
X-Source-Sender: bzq-79-183-124-234.red.bezeqint.net (telaviv1.shlomifish.org)
[79.183.124.234]:50803
X-Source-Auth: shlo...@shlomifish.org
X-Email-Count: 1
X-Source-Cap: c2hsb21pZjtzaGxvbWlmO2dhdG9yMjQ1Lmhvc3RnYXRvci5jb20=
Return-Path: beginners-return-117960-lellis=claimspages....@perl.org
X-OriginalArrivalTime: 20 Jul 2011 09:43:48.0749 (UTC) FILETIME=[8695ABD0:01CC4
6C1]

Hi Jim,

On Tue, 19 Jul 2011 16:22:14 -0700
Jim Gibson <jimsgib...@gmail.com> wrote:

> On 7/19/11 Tue  Jul 19, 2011  12:14 PM, "Tessio Fechine" <oiss...@gmail.com>
> scribbled:
> 
> > Hello,
> > I have a subroutine that uses useradd to create accounts
> > 
> > --
> > @cmd = ('useradd', '-m', $account);
> > my $result = system @cmd;
> > --
> > 
> > but when useradd fails, I need to stop it from sending the error message
to
> > STDER.
> > Is it possible with system?
> 
> You can use a shell process to discard STDERR messages (untested):
> 
> my $cmd = "useradd -m $account 2> /dev/null";
> my $result = system($cmd);
> 

The problem with interpolating strings into shell commands like that is
that
someone may put malicious code in it:

        my $account = 'foo; rm -fr / ';

so be careful - see: http://shlomif-tech.livejournal.com/35301.html
(Code/Markup Injection and Its Prevention ).

Regards,

        Shlomi Fish

> You could do the same by writing a shell script to redirect STDERR and
call
> that from your Perl program.
> 
> You can also use the IPC::Open3 module to capture STDERR. See 'perldoc
> IPC::Open3' for examples.
> 
> 
> 
> 



-- 
-----------------------------------------------------------------
Shlomi Fish       http://www.shlomifish.org/
Apple Inc. is Evil - http://www.shlomifish.org/open-source/anti/apple/

An apple a day keeps the doctor away.
Two apples a day will keep two doctors away. 
    — one of Shlomi Fish’s relatives

Please reply to list if it's a mailing list post - http://shlom.in/reply
.

--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/



--- End Message ---
-- 
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/

Reply via email to