in reply to Re^3: uninitialized split value in thread uninitialized split value
I am unable to solve this problem by any means possible. I use this syntax (split syntax, at the beginning of each sub) and it works for helix, turn and sheet, but it doesn't for seqres. Seqres key exists in hash. The error Use of uninitialized value $seqres in split at ./PDB_secondary_ex11.5.pl line 174, <IN> line 1726. refers to the last line in the file handle. I tried adding/removing whitespaces and basically I did what I could think of to solve this but I couldn't that's why I'm asking you know.
Re^5: uninitialized split value
by Marshall (Canon) on Oct 17, 2011 at 16:35 UTC
|
The most common cause of undefined in split is due to a blank line at the end of the file. Either remove that blank line or add something like: next if (/^\s*$/); to the code to skip blank lines. The split will of course fail if there is nothing to split! | [reply] |
|