Yeah I suppose it's easier when there is a visual
So I have a spreadsheet that has 4 tabs. STATION1 thru STATION4. This first column in each tab is the rowId , just incremental row counter.
data on STATION1 would look like this:
1,,business,first,last,email,,,,,
STATION2(Column2 is a reference to Column1 in STATION1):
1,1,,,123,Main,St,City,State,Zip
STATION3 (Column2 references Column1 in STATION2):
1,1,1,P-550,11223344
2,1,2,P-330,22334455
I am inserting data into two hashes like so:
$excel{$tab}{$row}{$col} = $cell->{Val};
$rehash{$tab}{$id}{$row} = $excel{$tab}{$row}{$col};
This attempt is finding no results:
for my $s2_key (keys %{$rehash{"1"}}) {
if ( exists( $rehash{"1"}{$s2_key} )) {
print SOMETHING;
}
Update: Durrr! That's what I get for operating on no sleep. Put "1" instead of "STATION2". I will continue to fiddle.
-
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.