If I write the results of the qx{query} to a file and inspect the contents with vi, each line is the appropriate length (ie, length($field)). Why are $field and trim_length so long? The extra bytes are keeping my compare to $line from finding equality. What can I do to trim the extra bytes from the $field values? Obviously the substr isn't working. Any help greatly appreciated.Line = 'org_name,"My Organization"' Field = 'org_name ' Field Length = 9 Trim Length = 'org_name ' Line ($line) is a string to which I want to compare some key words. Field ($field) is one of the key words. I have placed single quotes ar +ound the value so I can see its length. Field Length ($length) is the result of the Perl length($field) functi +on. Trim Length ($trim_length) is the result of substr ($field, 0, $length +). $field is read from a database table using the @fields = qx{query}; The relationship between @fields and $field comes from a foreach @fiel +d (@fields) loop.
In reply to Extraneous Data in Variable by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |