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)
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: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.