#!/bin/perl # # file: rm_comments # purpose: removes comments and empty line # created: pasha apr 15 2008 # modified: pasha apr 22 2010 # modification: shebang # usage: rm_comments < input > output # use strict; use warnings; use pasha::dieonwarn; if ((scalar (@ARGV) == 1) && ($ARGV[0] eq '--help')) { print < output EOF ; exit (0); } if (scalar (@ARGV) > 0) { print (STDERR "wrong arguments; try --help\n"); exit (-1); } for () { next if (/^#/ || /^\s*$/); print $_; } exit (0); __END__