host(); my $it=1; my %appHash=(); if($it == 1){ open(INPUTFILE,") { chomp; push @svcArray, (split /:/, $_, 3)[2]; } 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 choose a number from the list above: "; chop($input=); $input=trim($input); print " The input after chopping:$input\n"; } my $appCmnStr = " ; send_svc($input); exit(0); ################# sub send_svc{ my @aArray; if(@_[0] && (lc @_[0] ne 'z')){ @aArray = (@_[0]); }else{ @aArray= (1 .. $size); } foreach $svcObjNum (@aArray){ if($appHash{$svcObjNum}){ $appsStr = $appsStr.""; } } #### 1. Recruitment 2. Payments 3. Retail 4. Legal z. all Please choose a number from the list above: