hash key

Andy Armstrong n at rciss.us
Tue Oct 16 21:40:14 BST 2007


On 16 Oct 2007, at 21:34, asmith9983 at gmail.com wrote:
> Can someone direct me to the perldoc section which covers
> the situation where a value is used as the key which is not a  
> string or a variable as used in the following snippet of code
>
> getopts("v",\%options);
> my ($filename, at filenames);
> printf "Start deduplication run at %s\n",scalar localtime if  
> $options{v};
>
> It's the v in the $options{v} I'm referring to.

It's the same as 'v' - barewords are handled as hash keys. It's a  
fairly common idiom.

-- 
Andy Armstrong, Hexten





More information about the london.pm mailing list