I have to parse a big file and I do it line by line to keep stuff going correctly. I am at a point where I need it to go through and replace every " with inches and ' with feet, IF item in front of it is a digit (0-9).
I have this written in the script to parse it: while ($line = <OLDFILE>) { # $line = $line =~ /^\s*(.*)\s*\n$/; $line =~ s/^ //; $line =~ s/ $//; $line =~ s/\t/|/g; $line =~ s/\s+/ /mg; $line =~ s/^\s*//mg; $line =~ s/\s*$//mg; $line =~ s/\s*$//mg; ### The following lines mod the files to reflect inches and feet $line =~ s/"/in./mg; $line =~ s/'/ft./mg; print NEWFILE "$line\n"; help! TIA! -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]