Advertisement
Guest User

Untitled

a guest
Mar 20th, 2017
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Perl 0.32 KB | None | 0 0
  1. foreach my $line (@$arr) {
  2.     my ($a, $b, $c, $d) = split(' ', $line);
  3.     if ($a <= 0 || $b <= 0 || $c <= 0 || $d <= 0) {
  4.         $others++;
  5.     } elsif ($a == $c && $b == $d) {
  6.         if ($a == $b) {
  7.             $squares++
  8.         } else {
  9.             $rectangles++
  10.         }
  11.     } else {
  12.         $others++
  13.     }
  14. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement