Help for this page

Select Code to Download


  1. or download this
    my $result=`sudo /bin/mount /dev/fd0 /mnt/floppy`;
    if ($?) {  # there was an non zero return code
    ...
    } else {
        # looks like it worked
    }
    
  2. or download this
    if ($? == -1) {
        print "failed to execute: $!\n";
    ...
        else {
        printf "child exited with value %d\n", $? >> 8;
        }