#!/usr/bin/perl open(FILE, "text5.txt"); open(OUT,">output.txt"); while (){ print "processing $_"; chomp; if($_ =~ /^=/){ next; } if($_ =~ /^\s*$/){ next; } if($_ =~ /PAGE [0-9]+/){ next; } if($_ =~ /CODE/){ next; } if($_ =~ /P R O C E D U R E/){ next; } $code = substr($_,0,11); $code =~ s/\s+$//; $description = substr($_,22,30); $description =~ s/'//g; $amount = substr($_,53,8); $amount =~ s/^\s+//; if($code =~ /^\s*$/){ next; } if($description =~ /^\s*$/){ next; } $sql = <