Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

geekgrrl's scratchpad

by geekgrrl (Pilgrim)
on Jun 01, 2004 at 19:08 UTC ( #358425=scratchpad: print w/ replies, xml ) Need Help??

current code

typical sql query
select strain from sequence where seg in ('seg1', 'seg2', 'seg3', 'seg +4')
which then gets sorted in this sort of way -

  • we want the strains with the most segments (i.e. top strain will have seg 1 though 4), then the strains with only 3 segments, and so on.
  • If two strains both have the same number of segments present, we order alphabetically.
    @sorted =sort { grep( /seg/, keys %{ $result->{$b} } ) <=> grep( /seg/, keys %{ $result->{$a} } ) || lc $a cmp lc $b } keys %{$result}; # result contains sql 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 making s'mores by the fire in the courtyard of the Monastery: (10)
    As of 2014-08-20 08:09 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?

      The best computer themed movie is:











      Results (107 votes), past polls