- or download this
foreach $file(readdir DH) {
$name = $file;
next if $name =~ /^\./; # skip over dot files
&addheader($_);
}
- or download this
sub addheader {
open FH, "< $indir/$file" or printf "can't open %s\n",$file;
$line = <FH>;
$_ = $line;
- or download this
$field1 = m/^Clock/; # Check for Clock at beginning of file
printf "\n$file";
if ( $field1 == "1"){
- or download this
my @lines = <FH1>;
foreach $line ( @lines )
{
print FH2 $line;
}