Two questions here; one, is it appropriate to place error handling in a subroutine; two, where am I going wrong in the last two 'elsif' statements in this thread?
sub errhand { if ($website eq "three"){ next; } elsif ($website eq "five"){ next; } elsif ($website eq "calnet-test"){ next; } #elsif ($old_ip eq /\d\d.\d\d.\d\d\d){ #next; #} #elsif ($new_ip eq /\d\d.\d\d.\d\d\d){ #next; #} else{ die, "ERROR - Format is 'deploy website old_ip new_ip || 'depl +oy [three; five;calnet-test] 21.01.001 22.02.002'" } }
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |