note moritz <p>If your perl is of version 5.10 or later, you can add <code> use 5.010; </code> <p>at the start of your script, and substitute all your <c> print "something\n";</c> lines with <c>say "something"</c>. Looks like a small code, but it does make it more fun to read and write.</p> <p>As for your original question, you can write something like <code> if ($input =~ /^(y|yes)$/) { say "Backup is beginning..."; last; } elsif ($input =~ /^(n|no)$/) { die "Program is shutting down.\n"; } else { say "This is not a valid answer."; say "Please enter 'yes' or 'no'"; } </code> <p>This uses [doc://perlretut|regexes] to test for several values at once, laading to fewer branches with duplicate code. You could also write</p> <code> if ($input eq 'y' || $input eq 'yes') { say "Backup is beginning..."; last; } </code> <p>if you don't want to use regexes. <p>Finally you should check the return value of [doc://system]. Just because the backup file exists doesn't mean the backup was successfull. There could be a full file system, file system corruption, permission errors or other problems -- in which case [man://tar] will return a non-zero return code, which you should catch. See [doc://system] for the full documentation on how to do that. <!-- Node text goes above. Div tags should contain sig only --> <div class="pmsig"><div class="pmsig-616540"> [|Perl 6 - the future is here, just unevenly distributed] </div></div> 985327 985327