in reply to Checking Hash contents
Modules such as Data::Dump::Streamer are very useful in this sort of context for a diagnostic dump of the contents of a variable. Consider:
use strict; use warnings; use Data::Dump::Streamer; my @strings = ("key1\tvalue1", "key2\tvalue2", "key3\tvalue3"); my %values = map {/([^\t]+)\t(.*)/; $1 => $2} @strings; Dump (\%values);
Prints:
$HASH1 = { key1 => 'value1', key2 => 'value2', key3 => 'value3' };
|
|---|