From: Kevin Pfeiffer <[EMAIL PROTECTED]> > In keeping with my feeling that with 'map' one can do almost anything
quite right, but > (if I knew how) I'm happy to have managed to build something using > 'map' (without external help I mean). Seems easy, now. ;-) > > # months into numbers... > > $month = "Jan" # for example > > my %m2n; > my $x = "00"; > > map { $m2n{$_} = ++$x } qw(Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov > Dec); you should not use map{}() in void context. map{}() is supposed to create a list, in this case you are not creating any. You are just looping through a list. You should use for/foreach for that: $m2n{$_} = ++$x for qw(Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec); But the idea was good :-) Jenda ===== [EMAIL PROTECTED] === http://Jenda.Krynicky.cz ===== When it comes to wine, women and song, wizards are allowed to get drunk and croon as much as they like. -- Terry Pratchett in Sourcery -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]