#!/usr/bin/perl -w use strict; my $file = $ARGV[0] or die "Use $0 filename"; open(FILE_IN,"<$file"); open(FILE_OUT,">$file.out"); while () { if ($_ !~ /^#/) { print(FILE_OUT "$_"); } }