in reply to Re^3: "Global Symbol Requires Explicit Package Name" error
in thread "Global Symbol Requires Explicit Package Name" error
# What does this below statement acutally mean? $header_data{$newrow[2]} = [ $newrow[3..18] ];
You are creating an array of the 4th through 19th elements of the @newrow array and associating it to the 3rd element of @newrow in the %header_data hash array (i.e. you are using the 3rd element as a key and setting the value to a reference to an array of the 4th through 19th elements -- remember arrays start at index zero).
If there are duplicates of the 3rd elements in the data, then only the last row will be saved (maybe that's why you're "losing data"?).
Each 3rd element that came from @newrow above.# Which data field is actually being used to sort? for my $key (sort keys %header_data)
|
|---|