I've read elsewhere about subtleties with the instantiation
syntax I used (I think it was on a python propaganda page)
Easy enough to change.
The loop construct, however, is a bit strained. I don't really want to clobber $_, but I do like:
while(chomp($row = <$fh>)) {
Much better than:
while(1) {
chomp($row = <$fh>) or last;
I have Damians book, but only made it about half way through before losing the thread. I don't do much OO
programming, so I didn't have many concrete examples to
toy with while reading the book. It was very well written though, got much further than any other OO book I've tried.
-Blake
-
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.
|