Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??

Arunbear, you seem to be having some fun with this, though you have really made it explode beyond a simple silly subroutine that I plopped into my Nifty module. (My Nifty module is where I put subroutines that I use, but can't categorize anywhere else.) What you have written looks like it would have to be put in a stand alone module. You have added a lot of complexity that I am having a hard time following. It could be that I am having a hard time seeing past my own dispatch table.

I am not entirely sure what you mean when you say that you are making this functional. It could be that I see "subroutine", "sub", and "function" used almost interchangeably that I am not picking up on the subtle differences between them.

As to why the random sort is not acting as expected, I am not sure I can explain the results I was seeing returned. The best I can do is say that it was getting new sort parameters for each iteration of the list while it was being sorted. I also had trouble keeping numerical sorts out of the mix which of course would throw up all kinds of warnings when non-numbers were being sorted.

I hope that you found the idea useful and are using it. Thank you for taking the time to play with this and show me what else can be done. Really silly sorts like sorting from the second character or third to the last character will wait until later. I was thinking about assigning hex and ord numbers to each character and sort them that way, but I think that would be the same as a straight up $a cmp $b.

Have a cookie and a very nice day!
Lady Aleena

In reply to Re^4: short sorts by Lady_Aleena
in thread short sorts by Lady_Aleena

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



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others taking refuge in the Monastery: (4)
As of 2024-04-25 10:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found