Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Comment on

( #3333=superdoc: print w/ replies, xml ) Need Help??

But I get a bunch of errors:

:) Well, the code you posted doesn't use warning, so I don't see how you're getting those warnings :)

#!/usr/bin/perl -- use strict; use warnings; my @magma = qw/ 39CE7A132F3CF 1E739E84CBCF3 339E84CBCF3C7 39CF4265E79E3 2739E84CBCF3C 339E84CBCF3C7 273D09979E78F 1CE7A132F3CF1 39E739E84CBCF 33CE73D09979E 3CE73D09979E7 279CE7A132F3C 339CF4265E79E 0E73D09979E78 /; use Sort::Key::Radix qw/ skeysort /; my @sortedIdx = skeysort { my $what = $_; warn "WHAT $what "; $what = $magma[$_] if not length $_ > length scalar @magma; return $what; } 0 .. $#magma ; use Data::Dump qw/ dd /; dd \@magma ; dd \@sortedIdx ; dd @magma[@sortedIdx]; __END__ $ perl what WHAT 0 at what line 23. WHAT 1 at what line 23. WHAT 2 at what line 23. WHAT 3 at what line 23. WHAT 4 at what line 23. WHAT 5 at what line 23. WHAT 6 at what line 23. WHAT 7 at what line 23. WHAT 8 at what line 23. WHAT 9 at what line 23. WHAT 10 at what line 23. WHAT 11 at what line 23. WHAT 12 at what line 23. WHAT 13 at what line 23. WHAT 39CE7A132F3CF at what line 23. WHAT 1E739E84CBCF3 at what line 23. WHAT 339E84CBCF3C7 at what line 23. WHAT 39CF4265E79E3 at what line 23. WHAT 2739E84CBCF3C at what line 23. WHAT 339E84CBCF3C7 at what line 23. WHAT 273D09979E78F at what line 23. WHAT 1CE7A132F3CF1 at what line 23. WHAT 39E739E84CBCF at what line 23. WHAT 33CE73D09979E at what line 23. WHAT 3CE73D09979E7 at what line 23. WHAT 279CE7A132F3C at what line 23. WHAT 339CF4265E79E at what line 23. WHAT 0E73D09979E78 at what line 23. [ "39CE7A132F3CF", "1E739E84CBCF3", "339E84CBCF3C7", "39CF4265E79E3", "2739E84CBCF3C", "339E84CBCF3C7", "273D09979E78F", "1CE7A132F3CF1", "39E739E84CBCF", "33CE73D09979E", "3CE73D09979E7", "279CE7A132F3C", "339CF4265E79E", "0E73D09979E78", ] [13, 7, 1, 4, 6, 11, 12, 2, 5, 9, 0, 3, 8, 10] ( "0E73D09979E78", "1CE7A132F3CF1", "1E739E84CBCF3", "2739E84CBCF3C", "273D09979E78F", "279CE7A132F3C", "339CF4265E79E", "339E84CBCF3C7", "339E84CBCF3C7", "33CE73D09979E", "39CE7A132F3CF", "39CF4265E79E3", "39E739E84CBCF", "3CE73D09979E7", )

Apparently, on the first pass, $_ is the index, but subsequently it is the actual value --- the module interface doesn't exactly make sense to me, but if it really is faster ...


In reply to Re: Sort::Key::Radix::skeysort bug or user error? by Anonymous Monk
in thread Sort::Key::Radix::skeysort bug or user error? by traceyfreitas

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • Outside of code tags, you may need to use entities for some characters:
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.
  • Log In?
    Username:
    Password:

    What's my password?
    Create A New User
    Chatterbox?
    and the web crawler heard nothing...

    How do I use this? | Other CB clients
    Other Users?
    Others imbibing at the Monastery: (10)
    As of 2014-10-31 17:54 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?

      For retirement, I am banking on:










      Results (221 votes), past polls