in reply to (dws)Re: Declaring and initializing a hash with a list of keys and a list of values
in thread Declaring and initializing a hash with a list of keys and a list of values

Right. In real code, I'd simply do my first choice in the opening description. However, the idea of declaring a variable and having a reference to it immediately is a fun idiom. I used it earlier in template for using bind_columns with DBI, for example.

-- Randal L. Schwartz, Perl hacker

  • Comment on Re: (dws)Re: Declaring and initializing a hash with a list of keys and a list of values