I thought
%hash = ();
would work, but it's not. And yes, I am using strict. The code is a bit long, but an abridged version is:
use strict;
use warnings;
my %hash;
my @sets = qw(set_a set_b);
foreach my $set ( @sets ) {
&find_start($set); #defines start and end points to grab data
&fill_hash(); # fill 'er up
&print_hash(); #print out
&clean_hash(); #clean it out
}
The &find_start() looks throught the 6000 lines of text, and decides which line to start grabbing data, and which line to stopt at, based on the value of $set. I thought maybe I was grabbing the wrong stuff, but everything "adds up". Pun intended.
-
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.
|