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

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