As plenty of monks have pointed out, in the context of a conditional the ;1 isn't needed.
In other contexts, consider:
my $MODULE_WAS_LOADED = eval "require 'bar.pl'";
print "Debug: MODULE_WAS_LOADED=$MODULE_WAS_LOADED\n";
And in bar.pl:
# ... module code here ...
"For some reason this module has chosen to make its return value
some ridiculously long value; perhaps the original author simply
forgot to add the usual 1; at the end of the module and this return
value is simply whatever the last statement in the module evaluates
to. Whatever the case, I'd prefer it not polluting my debug output."
#EOF
-
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.
|