Hello All,
I have a question to pose to the wisdom of the Monks. I am just starting to work on Tab Delimited files and I have already run into a problem. I continue to get an error "Global Symbol Requires Explicit Package Name". Can anyone find what it is that I am doing wrong? I have read the files on declaring variables and Lexicon variables and they didn't seem to give me the specific information that I need to fix this. Any help is greatly appreciated.
Portree
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_outfil +e_latest, $remote_outfile_web, $Oper_Cd, $Pick_Ref_Num, $Part_Id, @header_da +ta, $newrow, @newrow, $head); # This gets the document from the server $f_mfg_desk = '//142.22.50.34/planning/logistics/programs/wip_query.tx +t'; @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 (<INFILE>) { $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], $n +ewrow[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);

Edited by Arunbear: Changed title from 'Variables', as per Monastery guidelines


In reply to "Global Symbol Requires Explicit Package Name" error by Portree

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.