@_{5..29}=split//,"s treutAoePlHcenh r akr\nJ";print values%_
Needs 5.6 or higher, though.
   MeowChow                                   
               s aamecha.s a..a\u$&owag.print

Replies are listed 'Best First'.
Re: Flip Flop III - Musical Buckets
by bobione (Pilgrim) on Apr 25, 2001 at 14:31 UTC

    I try to understand your small code, and there is no way !!
    Please MonkChow explain me the @_{5..29} functionality.
    To understand how it works, I split //,"0123456789" into @_{..} with other indexes.
    And this are my results...

    0129345678   for @_{1..10}
    0182934567   for @_{2..11}
    4560718293   for @_{3..12}
    9345607182   for @_{4..13}
    8293456071   for @_{5..14}
    7182934560   for @_{6..15}
    3450617289   for @_{7..16}
    2345061789   for @_{8..17}
    1234506789   for @_{9..18}
    0123456789   for @_{10..19}

    I can't find no logic. Hope someone got the use enlightment ;)

    BoBiOne KenoBi

      Add this to the bottom, it should help you understand what is going on.
      for (keys %_){ print "$_ = $_{$_}\n"; }
        It's supposed to help me ? :)
        Why %_ have this index order ???
        In the first line, why the 9 come between the 2 and the 3 ? ---> 1239345678 , Why this position ?
        After what on the second line, the 8 take place one number before the 9 ---> 128394567.
        On third line 7 go one number before the 8 ---> 172839456...
        It could be the rule but I am not sure at all !

        BobiOne
        Can Perl remain obfuscated for me ? ... No