while (){ s/\A [^"]* # Read until we get to a quote char " # The actual quote char ([^"]*) # Read (and save) until we hit another quote char /$1/x; $HASH{$_}++; }