Kevin Old wrote: > Hello everyone, Hello,
> I'm trying to define a constant hash and have the following: > > use constant STOPWORDS => map { lc $_ , 1 } qw(a about above across adj > after); > > I do not get a hash from this. You are defining STOPWORDS as a list. > This does work, however: > > my %stopwords = map { lc $_ , 1 } qw(a about above across adj after); > use constant STOPWORDS => \%stopwords; You are defining STOPWORDS as a hash reference. > I'm wondering what I'm doing wrong in the first definition. use constant STOPWORDS => { map { lc $_ , 1 } qw(a about above across adj after) }; John -- use Perl; program fulfillment -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>