use strict; use warnings; use win32::ole; my ($f_mfg_desk, $f_mfg_desk_output, $record,@wip_query, $wip_query, $opr_cd, @header, $header, %header, $x, $row, $row_array, @row_array, @rule_array, $BREAK, $year, $month, $day, $hour, $min, $sec, $run_time, $dtme, $local_outfile_timestamp, $remote_outfile_timestamp, $local_outfile_latest, $remote_outfile_web, $Oper_Cd, $Pick_Ref_Num, $Part_Id, @header_data, $newrow, @newrow, $head); # This gets the document from the server $f_mfg_desk = '//142.22.50.34/planning/logistics/programs/wip_query.txt'; @header = ("Oper_Cd","Pick_Ref_Num","Part_Id","Lot Qty","Order Id", "Order Lineitem Id","Order Lineline Id","Sublot Num", "Comm Invoice Num","Oper In Dt","Cust Early Shp Dt", "Cust Late Shp Dt","Current Date","Business Class Cd", "Action Expedite Flg","Required Ship Saleable", "Required Ship Inventory Transfer","Total Required Ships"); open (INFILE, '//163.10.50.33/planning/logistics/programs/chicago_wip_query.txt'); while () { $record = $_; chomp($record); @newrow = split(/\t/,$record); ###This next line is where I get the error $header_data{$newrow[2]} = [$newrow[3], $newrow[4], $newrow[5], $newrow[6], $newrow[7], $newrow[8], $newrow[9], $newrow[10], $newrow[11], $newrow[12], $newrow[13], $newrow[14], $newrow[15], $newrow[16], $newrow[17], $newrow[18]]; } ### error ends here close(INFILE);