in reply to Introduction to anonymous arrays and hashes
use strict; my %meta; for (split(/\n\n/, join('', <DATA>))) { split(/\n/); $meta{$_[0]} = {'val', $_[1], 'cc', $_[2], 'wc', $_[3], 'wrc', $_[ +4]}; } print $meta{Keywords}{val}; __DATA__ Title Welcome to my website! 22 4 1 Keywords candy, food, pop, candy cane, soda, caffeine 31 5 2
|
|---|