real_shell.pl 618 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. #!/usr/bin/perl
  2. # Author: Daniel "Trizen" Șuteu
  3. # License: GPLv3
  4. # Date: 30 April 2014
  5. # Website: https://github.com/trizen
  6. use 5.010;
  7. use strict;
  8. use warnings;
  9. use GD::Simple;
  10. my $img = 'GD::Simple'->new(500, 600);
  11. sub t($) {
  12. $img->turn(shift);
  13. }
  14. sub l($) {
  15. $img->line(shift);
  16. }
  17. sub c($) {
  18. $img->fgcolor(shift);
  19. }
  20. $img->clear;
  21. $img->moveTo(250, 300); # hopefully, at the center of the image
  22. my $loop = 5;
  23. for (my $j = 0.01 ; $j <= $loop ; $j += 0.01) {
  24. l $j;
  25. t $loop- $j + 1;
  26. }
  27. my $image_name = "shell.png";
  28. open my $fh, '>', $image_name or die $!;
  29. print {$fh} $img->png;
  30. close $fh;