my (@date, @F_SCORE, @F_SCORE_BOX,
This assignment makes @date gobble up all the values on the RHS, leaving the other arrays empty. A smaller example will illustrate this:
use warnings;
use strict;
use Data::Dumper;
my ($date_ref) = [0..3];
my ($F_SCORE_ref) = [5..7];
my (@date, @F_SCORE) = (@$date_ref, @$F_SCORE_ref);
print Dumper(\@date);
print Dumper(\@F_SCORE);
__END__
$VAR1 = [
0,
1,
2,
3,
5,
6,
7
];
$VAR1 = [];
From perldata:
You can actually put an array or hash anywhere in the list, but the first one in the list will soak up all the values, and anything after it will become undefined.
You should consider a different data structure: perldsc
-
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
or How to display code and escape characters
are good places to start.
|