Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Jul 23rd, 2010  |  syntax: Perl  |  size: 0.26 KB  |  views: 447  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. #!/usr/bin/perl
  2. use strict;
  3. use warnings;
  4. my $n = `pacman -Qu | wc -l`;
  5. my $cool = "88CC00";
  6. my $medi = "DDDD00";
  7. my $hot = "EE5500";
  8.  
  9. chomp($n);
  10. if ($n eq "0"){ print '${color '."$cool".'}OK${color}' }
  11. else{ print '${color '."$hot".'}'."$n new".'${color}' }
clone this paste RAW Paste Data