This is something between a SOPW and a Meditation. I'm not really asking a question, just grousing...
I suspect every language has its idiosyncratic compiler error messages. I know Perl is not immune. Consider:
C:\>perl -c ag2gen.pl
"my" variable $i masks earlier declaration in same statement at ag2gen
+.pl line 1391.
"my" variable @test_order masks earlier declaration in same scope at a
+g2gen.pl line 1391.
"my" variable @test_order masks earlier declaration in same statement
+at ag2gen.pl line 1393.
"my" variable $i masks earlier declaration in same statement at ag2gen
+.pl line 1393.
"my" variable @test_order masks earlier declaration in same statement
+at ag2gen.pl line 1393.
"my" variable $j masks earlier declaration in same statement at ag2gen
+.pl line 1393.
"my" variable %test_order masks earlier declaration in same scope at a
+g2gen.pl line 1394.
"my" variable @test_order masks earlier declaration in same statement
+at ag2gen.pl line 1394.
"my" variable $i masks earlier declaration in same statement at ag2gen
+.pl line 1394.
"my" variable @test_order masks earlier declaration in same statement
+at ag2gen.pl line 1394.
"my" variable $j masks earlier declaration in same statement at ag2gen
+.pl line 1394.
syntax error at ag2gen.pl line 1389, near "2]"
ag2gen.pl had compilation errors.
Here are the offending lines:
1389: for my $i (0..@test_order-2])
1390: {
1391: for my $j ($i+1..@test_order-1)
1392: {
1393: unless ( ( $test_order[$i] eq $test_order[$j] )
1394: or exists($test_order{"$test_order[$i]\t$test_order[$j]"}
+) )
for my $i doesn't mask anything. In fact, it doesn't compile (at least, not completely).
-QM
--
Quantum Mechanics: The dreams stuff is made of
-
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.
|