(C) 2003, Tim Maher 1-23 www.TeachMePerl.com veperlgrep Visually Enhanced Perl Grep highlighting technique replace what was matched by: alternate color ON, match, alt. color OFF changes to eperlgrep: $On=`tput smso`; $Off=`tput rmso`; $command=" s/$pattern/$On\$&$Off/g$X "; } # End of BEGIN block if (eval $command) { $prefix and print "$ARGV:"; print; }