Help for this page

Select Code to Download


  1. or download this
    chomp(my $in1 = $ARGV[0] || '');
    if (defined $in1) {
        #Validate;
    }
    
  2. or download this
    my $in1 = $ARGV[0] || 'user-did-not-pass-an-argument');
    print $in1;
    
  3. or download this
    perl -w myscript.pl # no argument
    perl -w myscript.pl "" # empty argument
    perl -w myscript.pl 0 # zero argument
    perl -w myscript.pl something-else # other argument