Advertisement
Guest User

Untitled

a guest
Apr 23rd, 2014
34
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1. Company,Employees
  2. '1', '33'
  3. '2', '36'
  4. '3', '30'
  5. '4', '21'
  6. '5', '36'
  7. '6', '24'
  8. .
  9. .
  10.  
  11. my %result;
  12. while ( my $rec = $slots->fetchrow_hashref ) {
  13. push @{ $result{ $rec->{"Employees"} } }, $rec->{"CompanyID"};
  14. }
  15. @order = map { $result{$_} } sort { $a<=>$b } keys %result;
  16.  
  17. Company , Employees
  18. 1 1
  19. 1 2
  20. 1 3
  21. up till 33 times for company 1.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement