#!/usr/bin/perl -n

## Simply print non-comment lines from argument file(s)
## Comments can start with either # OR ;

BEGIN {
    # keep only plain text files
    @ARGV = grep {-f && -T} @ARGV;
    
    # regex for filenames to skip
    $skip_regex = ''; 
}

# Print the file names
if ($ARGV ne $file) {
    $len = length $ARGV;
    print "\n", "-" x ($len + 2), "\n",
          "$ARGV :\n",
	  "-" x ($len + 2), "\n\n",
	  ;
    $file = $ARGV;
    if ($skip_regex && $file =~ /sample/) {
	print " # skipped\n";
	close ARGV;
     }
}

print unless (/^\s*[#;]/ or /^\s*$/);
