Yuval Yaari - Post details
Text Highlighting Script [perl][net]:
http://planet.gentoo.org/developers/yuval/2006/10/07/text_highlighting_script
Getoptはハッシュで受け取れたのか。
#!/usr/bin/perl
use Getopt::Std;
use Term::ANSIColor;
my $word = shift;
my %hash;
getopts('c:', \%hash);
$colour = $hash{'c'} || 'red';
while () {
s/($word)/colored($1, $colour)/ge;
}