Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
No line 1434 can't be the troublemaker because with or without warnings, undef ne 'commit'. The result of this boolean test would be false, and nothing would be printed. And as you can see, there is printout from this block:
I've got my sources! I'm committed!

To the op: use Data::Dumper, and print out what's in the dubious variables (here: $arg). If this sub is called a lot without any warnings, then it's better to restrict output to when it is actually useful. For that, I sometimes do things like:

use Data::Dumper; local $SIG{__WARN__} = sub { print STDERR @_, Dumper $arg };
You must put that where $arg is in scope, thus in the sub, and it needs to be run before the warning happens.

Also, print out the line number perl thinks it's on, it's in __LINE__. Sometimes it's off from the actual line number by 1, maybe sometimes even more (though I don't think I've ever seen that happen).


In reply to Re: Re: Use of uninitialized value in string by bart
in thread Use of uninitialized value in string by c

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others sharing their wisdom with the Monastery: (5)
As of 2024-04-19 12:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found