perl - How to avoid empty elsif? -
perl - How to avoid empty elsif? -
the below code want, tells me, empty elsif not practice. purpose create sure $type either snap or fs, alter $t if snap.
my $t = ""; if ($type eq "snap") { $t = "-t snapshot"; } elsif ($type eq "fs") { } else { fatalerror("must either snap or fs") } question
how do same, without empty elsif?
how about:
my $t = ""; if ($type eq "snap") { $t = "-t snapshot"; } elsif ($type ne "fs") { fatalerror("must either snap or fs") } perl
Comments
Post a Comment