Hi
Please help if you can.
Kind Regards
Stuart Clark
How do I delete each line in the test file that has 15 numbers and/or
letters followed by 3 whitespace characters.
The following file has the above situation on the first two lines
# start of file test
ccyymmdd4534323 043392H
ccyymmdd4537622 049434H
30000034364717283459322a15.32zM 042001H
30000045434551648534245a243.56zM 040532H
30000053232540927543293a2.45zM 040332H
# end of file test
open (IN,"test") || die "Could not open the test file\n";
open (OUT,">result") || die "Error could not create the output
file\n";
while (<IN>) {
s/([.]15)([\s]3)//; # Is this sort of the right track ????
print OUT $_;
}
close(IN) || die "Error cannot close test file\n";
close(OUT) || die "Error cannot close output file\n";
# output file must look like this
30000034364717283459322a15.32zM 042001H
30000045434551648534245a243.56zM 040532H
30000053232540927543293a2.45zM 040332H