#!/sw/bin/perl -w
use strict;
#########################
# By: Ventz Petkov      #
# Date: 8-18-05         #
# Comment Lines Remover #
#########################
if (@ARGV != 1) {
    print "\t\tUsage: ./delcomments.pl file\n";
    print "\t\tEx: ./delcomments.pl mycode.txt"; exit();
}

open(FP, $ARGV[0]); open(TP, ">.delcomments.tmp");
while (<FP>) { if($_ =~ s/^#//) { next; }; print TP $_; print $_; } close(FP); close(TP);
rename(".delcomments.tmp", $ARGV[0]); 
