in reply to Extraneous Data in Variable
For instance, you say:
Field Length ($length) is the result of the Perl length($field) function.
Trim Length ($trim_length) is the result of substr ($field, 0, $length).
But that means that if you put the two together, you get:
Which means "extract from the string everything between the start of the string and the end of the string, and return it". You get the whole string, naturally.substr($field,0,length($field));
And where do the newlines come from, that we see in the value of Field and Trim Length?
Can you post a short example that demonstrates the problem? Maybe then we can spot your error for you.
|
|---|