If you mean to store a list in a hash, you'll have to create a reference, either by creating an array and storing a reference to it as the value in the hash, or making an anonymous list right there. Let's take the latter approach:
See perlref for more information. (And remember that a hash can only store scalar values -- as a reference can be stored in a scalar, you can build more complex data structures by references. perldsc is the next place to look.)my %Config = ( PPingPath => '/home/dean/pping-v1.37/pping', PPingOptions => '-t 15 -q |', TraceRTPath => '/usr/sbin/traceroute', TRHops => '-m 3 | ', ExternalTarget => [ 'www.microsoft.com -p 80', 'www.netscape.com -p 80', 'www.silverhand.co.uk -p 80', 'www.demon.net -p 80', 'www.whit +ehouse.org -p 80'], Hosts => [ 'www.netscape.come -p 80', 'www.microsoft.com -p 80'] );
In reply to Re: Odd number of elements in hash assignment
by chromatic
in thread Odd number of elements in hash assignment
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |