Monks... what to do to fix this error ???? the program & the error is below,
Global symbol "$houtputfile" requires explicit package name at good.pl + line 12. Global symbol "$pid" requires explicit package name at good.pl line 12 +. Global symbol "%hfiles" requires explicit package name at good.pl line + 30. Global symbol "%hfiles" requires explicit package name at good.pl line + 38. Global symbol "%hfiles" requires explicit package name at good.pl line + 39. use strict; use warnings; my $input_file = $ARGV[0]; #input file name my $input_pid = $ARGV[1]; #input pid number my $input_string = $ARGV[2]; #input string to be searched print "Usage:perl file.pl <input file name> <input process id> <input + file string>" if (@ARGV != 3); open (my $hfile, '<', "$input_file") || die("Unable to open the file $ +input_file\n"); open (my $houtputfile, '>', "$houtputfile.$pid") || die("Unable to ope +n the file output.txt\n"); $hfile = *HFILE; my %hFiles = (); while (<$hfile>){ #read the file line by line my $line = $_; if ($line =~ /[DWEM]\s+.*?\s+(?:c|cm|M)\:($input_pid)\s+([^\.]+\.c +)/s) { my $c_file = $2; my $pid = $1; if($input_string eq $c_file){ #check with input string and I +f it matches # print $houtputfile "$line\n"; #write the output in a output + file $houtputfile = $hfiles{$pid}; if($houtputfile) { print $houtputfile "$_\n"; } else { print ("pid = $pid\n"); open( HPIDFILE.$pid,">$houtputfile.$pid") #open( $hfiles{$pid},">$houtputfile.$pid") or die("failed to open $houtputfile.$pid "); $hfiles{$pid} = *HPIDFILE.$pid; $houtputfile = $hfiles{$pid}; print $houtputfile "$_"; } } } }

In reply to Requires explicit package name by jaggu_bg

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.