in reply to Re: eval problem
in thread eval problem
And I implemented this as, e.g.:use Sys::SigAction qw( timeout_call ); if ( timeout_call( 5 ,sub { $retval = DoSomething( @args ); } ) { print "DoSomething() timed out\n" ; }
I get the following error:177 eval { 178 if ( timeout_call( 10, sub { $ret = system($mnt_cmd) +; } ) 179 { 180 logit ("Couldn't get to $smbdest, and couldn' +t mount it running $mnt_cmd"); 181 return 1; 182 }
What am I doing wrong syntactically? I've looged around, and this appears to be kosher?? TIA![support@hydra script]$ ./cfg_sucker.pl syntax error at ./cfg_sucker.pl line 179, near ") {" syntax error at ./cfg_sucker.pl line 186, near "}" Execution of ./cfg_sucker.pl aborted due to compilation errors.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: eval problem
by BrowserUk (Patriarch) on Jan 10, 2007 at 16:23 UTC | |
by muad33b (Acolyte) on Jan 10, 2007 at 16:42 UTC | |
by muad33b (Acolyte) on Jan 16, 2007 at 22:05 UTC |