my $myCities = "Baltimore:Chicago:Los Angeles:New York:San Diego:"; my @myCities = split(':', $myCities); print "Please pick one of the following cities by entering any portion of the beginning of the city name:(@myCities)\n"; while ( my $input_city = ){ foreach ($input_city) { if ($input_city =~ m/^L/i ) { print "We no longer tour LA, please try again!\n"; } if ( $input_city eq $myCities ){ ### here is where im lost## print "Found\n"; } } }