RE: Testing for command success

2002-05-07 Thread Timothy Johnson
Subject: RE: Testing for command success Can you try this ? system ("tar cvf ../test.tar *.grib"); if ($? == 0) { print "\nSuccess!\n"; } else { print "\nUnsuccessful!\n"; } The return code is in the perl $? variable. See perldoc perlvar for details. --

Re: Testing for command success

2002-05-07 Thread Chas Owens
On Tue, 2002-05-07 at 11:37, siren jones wrote: > I'd like to test the following command to see if it > ran successfully? Have no idea how or which variable stores > the success of a command ($!, $], $_ )? > > system "tar cvf ../test.tar *.grib"; > > > Tried: > > if (system "tar cvf ../test.t

RE: Testing for command success

2002-05-07 Thread Ho, Tony
Can you try this ? system ("tar cvf ../test.tar *.grib"); if ($? == 0) { print "\nSuccess!\n"; } else { print "\nUnsuccessful!\n"; } The return code is in the perl $? variable. See perldoc perlvar for details. -Original Message- From: siren jones [mailto:[EMAIL PROTECTED]]