Hi
Is it possible to make a 3rd command line argument optional and then execute a command if certain condition is met?
my $pkgname = $ARGV[0]; my $envname = $ARGV[1]; chomp; s/^\s+|\s+$//g; # trim spaces ##optional 3rd command line argument my $id = $ARGV[2]; chomp $id; if (not defined $id) { ($bquery eq $bfquery1) } else { ($bquery eq $bfquery2) }
In reply to Make command line argument optional by TonyNY
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |