Hi,
I am totally bamboozled by some text output I am getting for code I am troubleshooting for work.
Here are some lines of code:
if ($old_gnoc eq $gnoc)
{
print TEST "L782 - Counter: $counter_chk\t
+ $ip old_poller: $old_gnoc\tnew_poller: $gnoc\told_term: $old_group_t
+erm\tnew_term: $term\n";
$dir = "$homeDir/$old_gnoc";
$file = "groupChange.txt";
open (GRPCHG,">>$dir/$file");
print GRPCHG "L782 - Counter: $counter_chk
+\t $ip old_poller: $old_gnoc\tnew_poller: $gnoc\told_term: $old_group
+_term\tnew_term: $term\n";
close (GRPCHG);
}
OK, a bit on the code. There is no GRPCHG filehandle anywhere else in the program. There are no other print statements that start out with the string - L782.
Here is some relevant output for the file written to with the TEST file handle:
L782 - Counter: 7 128.212.27.1 old_poller: gnoc8 new_poller: gn
+oc8 old_term: GSUS new_term: CLCEDSAM_C
L782 - Counter: 8 128.212.28.1 old_poller: gnoc8 new_poller: gn
+oc8 old_term: GSUS new_term: CLCEDSAM_C
L782 - Counter: 9 128.212.28.46 old_poller: gnoc8 new_po
+ller: gnoc8 old_term: GSUS new_term: CLCEDSAM_C
L782 - Counter: 10 128.212.44.26 old_poller: gnoc8 new_po
+ller: gnoc8 old_term: GSUS new_term: CLCEDSAM_C
L782 - Counter: 11 128.212.27.6 old_poller: gnoc8 new_poller: gn
+oc8 old_term: GSUS new_term: CLCEDSAM_C
L782 - Counter: 12 128.212.28.74 old_poller: gnoc8 new_po
+ller: gnoc8 old_term: GSUS new_term: CLCEDSAM_C
L782 - Counter: 1 128.212.30.26 old_poller: gnoc8 new_po
+ller: gnoc8 old_term: GSUS new_term: CLCEDSAM_E
L782 - Counter: 2 128.212.64.26 old_poller: gnoc8 new_po
+ller: gnoc8 old_term: GSUS new_term: CLCEDSAM_E
And here is the entirety of the file written out to with file handle GRPCHG:
L782 -
No character after the dash.
Why in the world do the files lack equivalent output? What is happening to the output that is not in the smaller file but seemingly should be? Am I missng something obvious?
Bewildered!!!
Tony (o2)
-
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 How to display code and escape characters
are good places to start.