- I don't understand the intent of your first sentence here. Are you objecting that the PM solution offered (seems to you) to vary from your instructor's directions? If so, trust choroba's trouble-shooting. Push (see also next graf) allows you to add new elements to an array. When inside a loop, assigning a value to the array REPLACES whatever was in the array on the last iteration of the loop.
- Perhaps your instructor mentioned using your command line to obtain local help;
C:\> perldoc -f push
or
C:\> perldoc -f grep
There are many more sources of help local to your computer. See, for instance, perldoc perldoc and many others.
If you didn't program your executable by toggling in binary, it wasn't really programming!
-
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.
|