Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/perl
- use IO::Handle;
- use Time::HiRes qw(nanosleep);
- $text = "Welcome to FreeBSD";
- @colours = ( 37, 32, 33, 34, 35, 36, 31 );
- printf("\033[?25l");
- for($i = 0; $i < length($text); $i++)
- {
- $currentchar = substr($text, $i, 1);
- for($j = 0; $j < scalar(@colours); $j++)
- {
- unshift(@colours, pop(@colours));
- printf("\033[%d;40m%s", $colours[0], $currentchar);
- printf("\033[1D"); flush STDOUT; nanosleep(150);
- }
- printf("\033[1C");
- }
- printf("\n\033[0;0m\033[?25h");
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement