tvadnais wrote:
I am totally confounded by what appears to be a bug in the "does file exist"
functionality.
Here is the code as it stands now:
my $tmpfile = substr ($file, 0, index($file, ".pgp"));
I would probably do that like this instead:
( my $tmpfile = $file ) =~ s/\.pgp\z//;
print c
On Tue, 2008-07-29 at 19:49 -0700, tvadnais wrote:
> Oops, thank you for catching that... I haven't gotten that far in my
> debugging.
>
> Unfortunately, my problem was with the "if (-e $filename)" always returning
> false. In the code I'm testing, I have the pgp commented out, because I
> can't
se pgp can only be run by root.
Thank you,
Tim
-Original Message-
From: Mr. Shawn H. Corey [mailto:[EMAIL PROTECTED]
Sent: Tuesday, July 29, 2008 7:39 PM
To: [EMAIL PROTECTED]
Cc: beginners@perl.org
Subject: RE: Checking to see if file exists.
On Tue, 2008-07-29 at 19:06 -0700, tvadnais
On Tue, 2008-07-29 at 19:06 -0700, tvadnais wrote:
> Here is the true code if that helps:
> I've tried:
>
> foreach my $file ( @currset )
> {
> my $tmpstr = substr ($file, 0, index($file, ".pgp"));
> print ("trying to delete $tmpstr \n");
> ## pgp will core dump if there's already an unen
e),
(-e "F0715PAY.TXT") <--- This is the only one that worked.
Here is the true code if that helps:
...
Thanks,
Tim
-Original Message-
From: tvadnais [mailto:[EMAIL PROTECTED]
Sent: Tuesday, July 29, 2008 7:00 PM
To: beginners@perl.org
Subject: RE: Checking to see if
, "$HSTdir/$file");
} else {
my $msg = LogMsg (MSG => "The call to PGP failed on file:
$file", Echo => $debug);
EmailNotice(LIST => [$file], DEBUG => $debug, MSG => $msg,
WHO => [EMAIL PROTECTED]);
$notice .= "T
On Tue, Jul 29, 2008 at 2:32 PM, tvadnais <[EMAIL PROTECTED]> wrote:
> I am totally confounded by what appears to be a bug in the "does file
> exist"
> functionality.
>
>
>
> Here is the code as it stands now:
>
> my $tmpfile = substr ($file, 0, index($file, ".pgp"));
>
> print cwd(); ## d