yes my ftp code has always worked, so lets move on!
thanks,
Derek B. Smith
OhioHealth IT
UNIX / TSM / EDM Teams
614-566-4145
Chris Devers <[EMAIL PROTECTED]>
09/17/2004 11:14 AM
Please respond to Perl Beginners List
To: [EMAIL PROTECTED]
cc: Perl Beginners List <[EMAIL PROTECTED]>
Subject: Re: Net ::FTP and subroutine calls
On Fri, 17 Sep 2004 [EMAIL PROTECTED] wrote:
> Right thanks.... forgot about that! So how do I out this failed info to
> STDOUT (ftplog), b/c if it does fail I would want to know!
First things first: does the version I sent yesterday work? Focus on
getting the FTP transaction to finish properly, then start thinking
about adding in logging code.
> As far as the $^ I variable, yes I have tried just opening the files
> and reading and writing from them! Thanks for the tips and I am still
> GREEN ! :) What could be wrong with the in place editor ??? I am
> running this program as UID = 0. Any ideas?
I assume you must be replying to someone else here.
> Here is what I have but it still not working.
Delete the logging code.
Get things to work without it.
Then start adding it back in.
Hint: when you get to that point -- which you haven't yet, it seems -- a
common way to do logging is something like this
$status = do_something_risky( @args );
$time = set_timestamp;
print LOG "$time - did something risky: $status";
( $status eq "OK" ) or die "Bad things happened! $status\n$!";
Or something like that -- the point being that the logging should happen
before the die statement, not after it. The whole point of the die
statement is to halt the program and throw an error message back, so
anything that happens after that doesn't end up running.
--
Chris Devers