I feel that beginners should learn three argument open first
That's all fine and dandy that you feel that way, but that doesn't mean that if someone has a question about unless and block, you should treat their use of 2-arg open as if it contains security problem, just because it's 2-arg open.
It looks to me that the OP has already past the point of "learn 2-arg open or 3-arg open first". He *knows* 2-arg open. From his post, we cannot deduce the state of his knowledge of 3-arg open (nor of a gazillion other Perl constructs).
I prefer not to teach beginners about local and dynamic scope, at least not initially. OTOH, I do teach them about my and lexical scope in the very first lesson.
I'd like to point out that the poster came here with a specific question, and didn't come here with "Heh, I don't know any Perl -- who is going to give me my first lesson".
I also think that your use of terms like 'evil programming practice' when describing the efforts of someone who in your opinion still needs to get their first lesson isn't very constructive.
-
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.
|