Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: If statement problem with hash values

by tlm (Prior)
on Jun 15, 2005 at 17:17 UTC ( [id://466977]=note: print w/replies, xml ) Need Help??


in reply to If statement problem with hash values

This is the kind of problem for which I find the debugger invaluable (e.g. perl -d my_script.pl), as a quick tool to test the values of variables. Various hypotheses (such as "maybe there is trailing whitespace in the hash keys") as to the values of variables can be tested quickly with this tool. See perldebug.

Small point: the lines in @subject are chomped twice. (I don't think this is the cause of the problem.)

I think the problem is that you need $elements[2], not $elements[3].

Update: Upon closer inspection, I see an extra | that I missed before, so my last comment above is wrong.

the lowliest monk

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (2)
As of 2024-04-26 06:12 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found