perl/script and retval

Olivier Regnier oregnier at
Sun Apr 8 15:37:38 UTC 2007


I written a small script in sh :
# Downloading doc files
echo "===> Downloading doc files"
/usr/bin/csup $doc_supfile
if [ $RETVAL != 0 ]; then
    echo "abort"
    exit 0

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";
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