Advertisement
Guest User

Untitled

a guest
Aug 18th, 2017
44
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.49 KB | None | 0 0
  1. #!/usr/bin/perl
  2.  
  3. use IO::Handle;
  4. use Time::HiRes qw(nanosleep);
  5.  
  6. $text = "Welcome to FreeBSD";
  7. @colours = ( 37, 32, 33, 34, 35, 36, 31 );
  8.  
  9. printf("\033[?25l");
  10.  
  11. for($i = 0; $i < length($text); $i++)
  12. {
  13. $currentchar = substr($text, $i, 1);
  14. for($j = 0; $j < scalar(@colours); $j++)
  15. {
  16. unshift(@colours, pop(@colours));
  17. printf("\033[%d;40m%s", $colours[0], $currentchar);
  18. printf("\033[1D"); flush STDOUT; nanosleep(150);
  19. }
  20. printf("\033[1C");
  21. }
  22.  
  23. printf("\n\033[0;0m\033[?25h");
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement