Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 08 Apr 2007 17:38:44 +0200
From:      Olivier Regnier <oregnier@steelbox.org>
To:        freebsd-questions@freebsd.org
Subject:   perl/script and retval
Message-ID:  <46190C84.4080907@steelbox.org>

next in thread | raw e-mail | index | archive | help
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 :)




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?46190C84.4080907>