# skeleton file read & write functions... sub readfile { my ($array_p)=@_; @$array_p=<>;} sub save_file { my ($array_p)=@_; foreach (@$array_p) { print $_; } } # (above dummy routines will be changed later) ### main program ### # first open file readfile(\@cur_file); #will put file into specified array #update code #delete blank comment lines and blank lines @mynewfile=grep ( !/^#?\s*$/, @cur_file); #save results back in file save_file(\@mynewfile); #will save array back to file