Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
Welcome to the monastery, Dervish!

As suggested, you should give a minimal piece of code that will compile and run and produce the issue you're having. In case you're not aware (though you've likely guessed), the message you're seeing is a non-fatal warning, which means you're invoking the script with -w or putting use warnings; at the top. This is usually (always?) a good thing to do.

What this particular warning is telling you is that you're attempting to use a regular expression against an undefined variable. Something like the following, for example, would produce a similar warning to what you're seeing.
use warnings;## good line to have. use strict; is also prudent $x=undef; ## I explicitly set it to undef here] ## even if I commented this, though, I'd have ## the same warning ($s)=$x=~m/regex/; ## $x is undefined, and produces warning print $s; ## presumably, I wanted $s for something
You should definitely look at the line number suggested by the warning.

In reply to Re: Why? uninitialized value in pattern match when using if (defined) by SamCG
in thread Why? uninitialized value in pattern match when using if (defined) by Dervish

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 contemplating the Monastery: (1)
As of 2024-04-15 21:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found