o2bwise has asked for the wisdom of the Perl Monks concerning the following question:
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)
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Totally Befuddled With (Lack of) Text Output
by kyle (Abbot) on Sep 12, 2008 at 18:47 UTC | |
by o2bwise (Scribe) on Sep 12, 2008 at 19:40 UTC | |
by sgifford (Prior) on Sep 12, 2008 at 19:54 UTC | |
Re: Totally Befuddled With (Lack of) Text Output
by jethro (Monsignor) on Sep 12, 2008 at 18:54 UTC | |
by o2bwise (Scribe) on Sep 12, 2008 at 19:42 UTC |
Back to
Seekers of Perl Wisdom