George said:
Josef Moellers wrote:
I never wanted to give the complete code, and why should I
You don't have to post "complete code", at least, I didn't.
However, you posted a bad example as it manipulates the symbol table.
The reference to @{...} is considered bad code and "use strict" is there
to catch these. Uncounted replies have pointed out that using a hash is
The Right Thing to do.
, I answered
what I though OP asked, Paul Lalli pointed that out that mistake,
people many sometime just point towards documentation should OP cut and
paste those lines in perl code and compile them as it is?
Sorry, but I can't quite parse this.
If a question is answered by one of the articles in the FAQ or
documentation, then pointing people at the FAQ list is OK. IMHO, if
answering the question requires less keystrokes than pointing at the
FAQ, then I do prefer that.
When I post a code snipped, I try to adhere to posting rules in that the
code posted should pass
use warnings;
use strict;
and, if possible, it should have been tested (putting them within
<untested>, </untested> might be OK in some circumstances).
If I correct someone's code snippets, then, yes, the OP should be able
to cut-and-paste the correction. In this case, as the question was about
a technique, rather than a non-working code (Alextophi didn't post any
code that is proper Perl), no cut-and-paste solution could be given.
But I stand by my statement that the code line you provided does not
pass "use strict" and, as such, does not adhere to posting rules here.
Your attitude ("dumb head", "why should I") strikes me as being
impolite, but that is my very personal feeling and others might regard
you as being nice and considerate (as it appears, some do not).
This now has little to do with Perl any more, so I think we should close
this debate here.
Josef