#!/usr/bin/perl -W if (scalar(@ARGV)) { open INP, "<$ARGV[0]" or die "Couldn't open file: [$ARGV[0]] $!\n"; } else { print "usage: $0 [filename]\n"; print " ex: $0 myfile.pl > newfile.pl "; exit(0); } READ: while () { # 1: Doesnt Work # next READ if (/^\s*#/) unless (/^#!/); # 2: Doesnt Work # {next READ if (/^\s*#/)} unless (/^#!/); # 3: Doesnt Work # if (/^\s*#/) { next READ } unless (/^#!/); # 4: Doesnt Work # unless (/^#!/) next READ if (/^\s*#/); # 5: Does Work unless (/^#!/) {next READ if (/^\s*#/)}; print; } close (INP);