Advertisement
alienresidents

"rolling_eyes.pl" :: Can't remember why I created this...

Dec 13th, 2018
125
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Perl 0.92 KB | None | 0 0
  1. #!/usr/bin/perl
  2. # EDIT:: I remember why I did this now.
  3. # The script name is "rolling_eyes.pl", so I was going to
  4. # send this to people and at some points put some unicode
  5. # into it so that it printed out me rolling my eyes at
  6. # them... ahem, such an author is himself perhaps worthy
  7. # of receiving this...
  8.  
  9. use strict;
  10. use warnings;
  11. use diagnostics;
  12. use Data::Dumper;
  13.  
  14. my $debug = shift;
  15. # my $quadrants = {{{
  16. my $quadrants = [(
  17.     'u',
  18.     'l',
  19. )];
  20. # }}}
  21. # my $eyes = {{{
  22. my $eyes = [(
  23.   'r',
  24.   'l',
  25. )];
  26. # }}}
  27. print Dumper @{$quadrants} . "\n" if $debug;
  28. print Dumper @{$eyes} . "\n" if $debug;
  29. my $quad_count = scalar((@{$eyes})) + scalar(@{$quadrants});
  30. for (my $i = 0; $i < $quad_count; $i++) {
  31.   for (my $j = 0; $j < scalar(@{$quadrants}); $j++) {
  32.     my $quad_thing;
  33.     $quad_thing = scalar($i % ($quad_count));
  34.     my $eyes_thing = $j % scalar(@{$eyes});
  35.     print "$eyes_thing : $quad_thing\n";
  36.   }
  37. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement