Hello beginners@perl.org, anyone could me help with:
use strict; use warnings; my %kw = (); my $kw = \%kw; for my $cat (split(/\//, 'something/other/foo/bar')) { $kw->{cnt}++; $kw->{cat${kw->{cnt}}} = $cat } I get: Can't use bareword ("kw") as a HASH ref while "strict refs" in use.. The goal is to get something like: $kw->{cat1} = 'something', $kw->{cat2} = 'other', $kw->{cat3} = 'foo', $kw->{cat4} = 'bar' anyone? -- --. ,-- ,- ICQ: 7552083 \|||/ `//EB: www.2ge.us ,--' | - |-- IRC: [2ge] (. .) ,\\SN: 2ge!2ge_us `====+==+=+===~ ~=============-o00-(_)-00o-================~ When hell freezes over? I just sold Satan a fur coat the other day... -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>