$system1 = ; # this is manual input from the keyboard #... $system1 =~ s/\W.*//; # what if input was " box1" (initial space)? #...