Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re^2: intermix list of items

by tstock (Curate)
on Oct 10, 2004 at 17:20 UTC ( #398012=note: print w/ replies, xml ) Need Help??


in reply to Re: intermix list of items
in thread intermix list of items

'gt' refers to the size of the string, running your example solution didn't seem to help. I was going for (and failed) non-equality of the substring means they are identical in sort order by using 'eq'.


Comment on Re^2: intermix list of items
Re^3: intermix list of items
by pg (Canon) on Oct 10, 2004 at 17:30 UTC
    "'gt' refers to the size of the string"

    No. In your code, gt looks at "dictionary sequence".

    If string size/length is what you wanted, say length($str) expliciltly.

    use Data::Dumper; my @foo = ("abc", "bc"); print Dumper(sort bar1 @foo); print Dumper(sort bar2 @foo); sub bar1 { return $a gt $b; } sub bar2 { return length($a) gt length($b); }

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://398012]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (7)
As of 2014-07-26 03:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (175 votes), past polls