On Mon, 25 Sep 2000 13:00:58 +0200, Henrik Tougaard wrote: >Are the counts stuffed in the array in the order they appear in the >tr-string? or in ascii-order? or whatever? In the same order as they are in the tr/// string, of course. @freq{'a' .. 'z', '0' .. '9'} = tr/a-z0-9//; That just won't work. The original proposal will however (or at least I can't find any obvious blunders)! The hidden flaw is that it will be FAR slower than the original tr///, because it needs to search for the hash key for every single matching character it finds. Plus, in Perl 5, NO core function returns a hash. None at all. -- Bart.
- RFC 283 (v1) C<tr///> in array context should re... Perl6 RFC Librarian
- Re: RFC 283 (v1) C<tr///> in array context ... Bart Lateur
- RE: RFC 283 (v1) C<tr///> in array context ... Henrik Tougaard
- Re: RFC 283 (v1) C<tr///> in array cont... Bart Lateur
- Re: RFC 283 (v1) C<tr///> in array ... Randal L. Schwartz
- Re: RFC 283 (v1) C<tr///> in ar... Simon Cozens
- Re: RFC 283 (v1) C<tr///> in ar... Bart Lateur
- Re: RFC 283 (v1) C<tr///> ... Simon Cozens
- Re: RFC 283 (v1) C<tr///&... Bart Lateur
- Re: RFC 283 (v1) C<tr///> in array context ... Richard Proctor
- Re: RFC 283 (v1) C<tr///> in array cont... Simon Cozens
- Re: RFC 283 (v1) C<tr///> in array context ... Paris Sinclair
- Re: RFC 283 (v1) C<tr///> in array cont... Bennett Todd
- Re: RFC 283 (v1) C<tr///> in array context ... Russ Allbery