Perl - find and save in an associative array word and word context
问题 I have an array like this (it's just a little overview but it has 2000 and more lines like this): @list = ( "affaire,chose,question", "cause,chose,matière", ); I'd like to have this output: %te = ( affaire => "chose", "question", chose => "affaire", "question", "cause", "matière", question => "affaire", "chose", cause => "chose", "matière", matière => "cause", "chose" ); I've created this script but it doesn't work very well and I think is too much complicated.. use Data::Dumper; @list = (