in reply to Re^6: Creating hash with my imputin thread Creating hash with my imput
Just replace exit with last and it should work the way you want it to, ie: if ($in =~ /exit/i){ last }