thenaz has asked for the wisdom of the Perl Monks concerning the following question:
my %bar = ( a => '', b => '', ); my $broken_count = @bar{'a', 'b'}; my $working_count = map {$_} @bar{'a', 'b'}; print "broken_count : $broken_count\n"; print "working_count: $working_count\n";
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Scalar context of slice
by FunkyMonk (Chancellor) on Oct 03, 2008 at 20:30 UTC | |
by tye (Sage) on Oct 03, 2008 at 21:06 UTC | |
by FunkyMonk (Chancellor) on Oct 03, 2008 at 21:32 UTC | |
by tye (Sage) on Oct 03, 2008 at 22:38 UTC | |
by BrowserUk (Patriarch) on Oct 04, 2008 at 00:26 UTC | |
| |
Re: Scalar context of slice
by merlyn (Sage) on Oct 05, 2008 at 14:42 UTC | |
Re: Scalar context of slice
by JavaFan (Canon) on Oct 04, 2008 at 01:14 UTC | |
Re: Scalar context of slice
by wol (Hermit) on Oct 06, 2008 at 14:10 UTC | |
Re: Scalar context of slice
by Xilman (Hermit) on Oct 09, 2008 at 15:25 UTC |