Guys I am working with millions of lines of data that "should" all be in the same format, however I am finding hundreds of lines that are not. A line may have ~10 fields space delimited. Suppose I am splitting the line into scalars that I can work with, and perform math on. Suppose fields 6-8 are supposed to be numeric and available for math. I am getting non-numeric warnings on several of them and just want to write the line out to an "errors" file so that I can resolve the formatting.
How can I do something to test if scalar 6, 7, or 8 is not numeric (or even empty), write the line to a file and move to the next line. I can handle the "else". I'd prefer to use standard perl as it is very difficult at my company to pull in additional packages.
In reply to Find nonnumeric scalars by urbs33
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |