On Sun, 8 Apr 2007, Olivier Regnier wrote:

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.

Hint: does $retval have a return value assigned to it anywhere?

Even then, it may not work like you expect.  That is explained:

perldoc -f system

In general, 'perldoc -f functionname' is very useful.  Also, see

perldoc perlstyle

So that code section would be better (more Perlishly) done like this:

--
my $doc_supfile="/etc/doc-supfile";

# Downloading doc files
print "===> Downloading doc files\n";
system("/usr/bin/csup $doc_supfile") == 0 or die "abort: $?\n";
--

-Warren Block * Rapid City, South Dakota USA
_______________________________________________
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to