Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re^4: uninitialized split value

by etheral (Acolyte)
on Oct 17, 2011 at 16:20 UTC ( [id://931964]=note: print w/replies, xml ) Need Help??


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.

Replies are listed 'Best First'.
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!

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://931964]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others exploiting the Monastery: (9)
As of 2024-04-23 18:31 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found