RE: Archive::Zip funnny return status

2003-08-14 Thread Dan Muey
t; > for TRUE/FALSE based on the return status. > > Oh it's a constant! Thanks Tim! I thought it was awfully > starnge that it was using numeric operators. I switched to a > regex because I kept getting a "non digit used with numeric > operator" with use strict. >

RE: Archive::Zip funnny return status

2003-08-10 Thread wiggins
evaluate > > > to 0. At least I think I remember having trouble with that > > > module because it returns 0 on success, and I kept testing > > > for TRUE/FALSE based on the return status. > > > > Oh it's a constant! Thanks Tim! I thought it was awfully

RE: Archive::Zip funnny return status

2003-08-06 Thread Dan Muey
> I think your pattern match will only catch a literal AZ_OK, > not the constant. And I'm not sure, but AZ_OK might evaluate > to 0. At least I think I remember having trouble with that > module because it returns 0 on success, and I kept testing > for TRUE/FALSE based

RE: Archive::Zip funnny return status

2003-08-06 Thread Tim Johnson
Muey Cc: [EMAIL PROTECTED] Subject: RE: Archive::Zip funnny return status On Wed, 6 Aug 2003 11:33:18 -0500, "Dan Muey" <[EMAIL PROTECTED]> wrote: > > > > I think your pattern match will only catch a literal AZ_OK, not

RE: Archive::Zip funnny return status

2003-08-05 Thread Tim Johnson
I think your pattern match will only catch a literal AZ_OK, not the constant. And I'm not sure, but AZ_OK might evaluate to 0. At least I think I remember having trouble with that module because it returns 0 on success, and I kept testing for TRUE/FALSE based on the return s

Archive::Zip funnny return status

2003-08-05 Thread Dan Muey
use Archive::Zip; ... my $member = $zip->memberNamed($zippedfile); my $rc = $member->extractToFileNamed($unzippedfile); if($rc =~ m/AZ_OK/) { print "ok -$rc-\n; } else { print "Bad -$rc-\n"; } The code above *always* prints: Bab -0- But $unzippedfile is cre

Re: Return Status

2002-12-11 Thread Mystik Gotan
Use eval and check $@ for error checking. -- Bob Erinkveld (Webmaster Insane Hosts) www.insane-hosts.net MSN: [EMAIL PROTECTED] From: "Paul Kraus" <[EMAIL PROTECTED]> To: "'Perl'" <[EMAIL PROTECTED]> Subject: Return Status Date: T

Re: Return Status

2002-12-10 Thread Jeff 'japhy' Pinyan
On Dec 10, Paul Kraus said: >instead of setting my own $error can I instead just check if &mount >completed ok? Is there a better way to do this? Sure. >sub mount{ >!system >"mount","-t","smbfs","-o","username=$ini{$section}{username},password=$i >ni{$section}{password}", > >"//$ini{$sec

RE: Return Status

2002-12-10 Thread Hanson, Rob
... sub mount{ ... do stuff ... # the last evaluated value is automatically returned ! system(...); } Rob -Original Message- From: Paul Kraus [mailto:[EMAIL PROTECTED]] Sent: Tuesday, December 10, 2002 5:28 PM To: 'Perl' Subject: Return Status instead of setting my own $e

Return Status

2002-12-10 Thread Paul Kraus
instead of setting my own $error can I instead just check if &mount completed ok? Is there a better way to do this? Code Snip - Foreach loop ... &mount; next if ($error == 1); mkdir "//backup/$ini{$section}{machine}" unless (-e "/backup/$ini{$section}{machin

Re: capturing a return status on NT

2001-04-30 Thread Paul
--- "Morse, Loretta" <[EMAIL PROTECTED]> wrote: > > Hello, > > While running a perl script on NT is there a way to capture the > return status of a command? I know how to do this on unix but it seems > to be different on NT. I know there is a variable called e

capturing a return status on NT

2001-04-30 Thread Morse, Loretta
Hello, While running a perl script on NT is there a way to capture the return status of a command? I know how to do this on unix but it seems to be different on NT. I know there is a variable called errorlevel on NT but not sure how to access this from a perl script. Here is what I'm tryi