I would like to know how to check whether a system command has worked.
The system command attempts to mount a floppy on a Linux machine, and if it is successful, do some stuff.
The code I have used is as follows:
The error message gets displayed the first time, but not the second time.if (system "sudo /bin/mount /dev/fd0 /mnt/floppy") {# do some stuff} else {# display an error message}
Thanks,
CJ
In reply to checking on a system process by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |