I have successfully backed up my data file using:
copy("applicants.txt","$targetfile") or die "Copy failed: $!";I have read that copy, or any function, returns 1 upon success, 0 upon failure. I wish to test for success or failure without user resorting to the log file. I would expect something simple like:
if (whatever == 1) { do something; }I have researched the archive and google without success in answering this. Please respond with code example, as I'm a newbie. Thanks.
In reply to Testing Return Values by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |