in reply to Undef and Unitialized Issue
Hello Pharazon,
It would help if you provided a sample of the input file, together with the output you are getting. At the least, you should specify the exact form of the warning message.
In the meanwhile, I’m guessing that the problem arises in this expression: substr($_, 57, 14) when the string in $_ is less than 57 characters long. If so, you can remove the warning by adding a test along these lines:
my $temp = substr($_, 0, 56) . $sp x 26; $temp .= substr($_, 57, 14) if length >= 57; $RECORD[$det_line] = $sp x 4 . ltrim($temp);
Hope that helps,
| Athanasius <°(((>< contra mundum | Iustus alius egestas vitae, eros Piratica, |
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Undef and Unitialized Issue
by Pharazon (Acolyte) on Apr 02, 2015 at 14:40 UTC | |
by Athanasius (Archbishop) on Apr 02, 2015 at 15:29 UTC | |
by Pharazon (Acolyte) on Apr 02, 2015 at 17:36 UTC | |
by marinersk (Priest) on Apr 02, 2015 at 20:31 UTC | |
by soonix (Chancellor) on Apr 07, 2015 at 08:05 UTC |