in reply to system @args problem

The usual way to deal with something like this is to wrap your system call in an eval block, and use an alarm to set a timeout. For example:
my $timeout = 20; # or whatever is appropriate eval { local $SIG{ALRM} = sub { die "timedout" }; alarm $timeout; # Your system call goes here.... alarm 0; }; if ($@) { # $@ will contain error message, if any }

Hope this helps,
Darren :)