Re: checking return code

2002-06-05 Thread drieux
On Wednesday, June 5, 2002, at 09:54 , lz wrote: > Hi guys, > > I have the following line: > system("cat $FILENAME | mailx -s \"test\" $mailAddress > "); > > How can I check whether mailx operation above was > successful or not? The homeboys have covered the basic bases but what you will p

Re: checking return code

2002-06-05 Thread David T-G
Leon, et al -- ...and then lz said... % % David, % % Thank you for useful info! Happy to help! % % But as I can see this approach won't catch the problem % if the incorrect email was specified ? Hrmmm... You mean if $mailAddress was incorrectly provided? No, it won't. If mailx exite

Re: checking return code

2002-06-05 Thread lz
David, Thank you for useful info! But as I can see this approach won't catch the problem if the incorrect email was specified ? Thank you! --- David T-G <[EMAIL PROTECTED]> wrote: > Leon -- > > ...and then lz said... > % > % Hi guys, > > Hello! > > > % > % I have the following line: >

RE: checking return code

2002-06-05 Thread Kipp, James
the docs explain the return codes for system, this is what i used: my $err = $? >> 8; if ($err) { print "puked\n" } else {print " success\n"} -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Wednesday, June 05, 2002 12:54 PM To: [EMAIL PROTECTED] Subj

Re: checking return code

2002-06-05 Thread David T-G
Leon -- ...and then lz said... % % Hi guys, Hello! % % I have the following line: % system("cat $FILENAME | mailx -s \"test\" $mailAddress % "); % % How can I check whether mailx operation above was % successful or not? Just check the exit code. A quick perldoc -f system tells us that