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