perl/script and retval
Olivier Regnier
oregnier at steelbox.org
Sun Apr 8 15:37:38 UTC 2007
Hello,
I written a small script in sh :
# Downloading doc files
echo "===> Downloading doc files"
/usr/bin/csup $doc_supfile
RETVAL=$?
if [ $RETVAL != 0 ]; then
echo "abort"
exit 0
fi
I want to rewritte this code in perl script.
my $retval=0;
my $doc_supfile="/etc/doc-supfile";
# Downloading doc files
print "===> Downloading doc files\n";
system("/usr/bin/csup $doc_supfile
if (! $retval) {
print "abort";
exit;
}
I don't know what happened with retval but that doesn't work correctly.
Can you help me please ?
Thank you :)
More information about the freebsd-questions
mailing list