#!/usr/local/bin/perl use warnings; use strict; my $file = shift; if($file =~ /\.(p[ml]|t)$/i) { system "/usr/local/bin/perltidy -html -st -ntoc -npod -pre -nss -nnn" } else { system "cat -n"; }