Created
September 6, 2016 13:38
-
-
Save chew-z/d007617734473fada89652d900821bf2 to your computer and use it in GitHub Desktop.
Prints Lorem ipsum with fore- and background colors
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl | |
use Term::ExtendedColor qw(:all); | |
use strict; | |
use warnings; | |
use feature qw(say); | |
say "Throw me two numbers or two color names separated by space(s)"; | |
while (<>) { | |
# print $_; | |
chomp($_); | |
my @row = split /\s+/, $_; | |
my ($fore, $back) = @row[0, 1]; | |
say fg($fore, bg($back, 'Lorem ipsum')); | |
clear(); | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment