Re: Testing for Success

2002-05-07 Thread Jonathan E. Paton
> Yeah, Tony your sturcture worked fine... except > > system "tar cvf ./test.tar *.grib" > if ($? == 0) { > print "\nSuccess!\n"; > } > else { >print "\nUnsuccessful!\n"; > } Perl programmers are lazy, and don't use things like '== 0' almost 100% of the time. The following

Testing for Success

2002-05-07 Thread siren jones
Tony and Chas, thanks for the help. First problem was using switched from DOS PC to UNIX system which had no idea what #! c:\perl was since it wanted #! /usr/global/perl. Don't really understand how $exit_value = $? >> 8; $signal_num = $? & 127; $dumped_core = $? &