$system1 = ; # this is manual input from the keyboard #... $system1 =~ s/\W.*//; # what if input was " box1" (initial space)? #... #### ( $system1 = ) =~ s/^\W*(\w+).*/$1/s; #### my %systems = ( box1 => 1, box2 => 2 ); my $Usage = "Usage: $0 (" . join('|', sort keys %systems) . ")\n"; die $Usage unless ( @ARGV == 1 and $systems{$ARGV[0]} ); $system1 = lc( shift );