package HostCycle; $ftp_host = undef; sub until { ; } sub then { ; } sub cycle {my $self=shift; for $ftp_host (@ftp_host) { my $retval = $self->until($ftp_host); if ($retval) { $self->then($ftp_host); } else { ++$error_count; } package SendOrder; @ISA=qw(HostCycle); sub until { # Wait for upfile to disappear } sub then { # Upload orderfile and upfile } package GetOrder @ISA=qw(HostCycle}; sub until { # Wait for downfile to disappear } sub then { # Download all files in directory }