in reply to NET::FTP put()/append() error handling
use warnings will catch this problem. To fix it you'll need to re-write it as:sub myohmy { my $y = shift; my $x = "true" if ($y); my $x = "not true" if (!$y); return $x; } print "myohmy(0) = ", myohmy(0), "\n"; print "myohmy(1) = ", myohmy(1), "\n"; __END__ # outputs: myohmy(0) = not true myohmy(1) =
but I'd probably just use an if...else... construct.my $ret; $ret = ... if ($put_try == 0); $ret = ... if ($put_try > 0);
Another issue with your retry logic is that if you want to recover from a failed put by appending data, you need to:
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: NET::FTP put()/append() error handling
by Viki@Stag (Sexton) on Jul 02, 2008 at 07:00 UTC | |
|
Re^2: NET::FTP put()/append() error handling
by Viki@Stag (Sexton) on Jul 02, 2008 at 07:06 UTC | |
by pc88mxer (Vicar) on Jul 02, 2008 at 13:43 UTC | |
by Viki@Stag (Sexton) on Jul 07, 2008 at 06:31 UTC |