host(); my $it=1; my %appHash=(); if($it == 1){ open(INPUTFILE,") { chomp; my $svsc = $_; @svcArray= split(/:/,$svsc); } close (INPUTFILE); foreach my $svc (@svcArray){ $appHash{it} = $svc; print "\n\t\t\t$it. $appHash{$it}\n"; $size = $it; $it++; } print "\n"; print "\t\t\tA for All \n"; print "Please enter # for the service you're trying to call:"); chop($input=); $input=trim($input);# I've function written for taking the spaces of input print " The input after chopping:$input\n"; }