Skip to content

Instantly share code, notes, and snippets.

@chew-z
Created September 6, 2016 13:38
Show Gist options
  • Save chew-z/d007617734473fada89652d900821bf2 to your computer and use it in GitHub Desktop.
Save chew-z/d007617734473fada89652d900821bf2 to your computer and use it in GitHub Desktop.
Prints Lorem ipsum with fore- and background colors
#!/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