Re: Need help with a question.
- From: Trev <trevor.dodds@xxxxxxxxx>
- Date: Sat, 28 Jun 2008 14:44:35 -0700 (PDT)
On Jun 28, 5:33 pm, J�rgen Exner <jurge...@xxxxxxxxxxx> wrote:
Anonymous coward <anonym...@xxxxxxx> wrote:
On Sat, 28 Jun 2008 13:18:08 -0700, Trev wrote:
open (OTF, ">blah.txt");
print OTF $DAT;
That makes no sense at all. Why would you want to print a filehandle
Maybe he wants to print _to_ a filehandle?
open (TMP, ">>$mactmp");
print TMP "$server". "," . "$cpqlogline\n"; close TMP;
Why do you open and close a file inside a loop?
Indeed, that is an expensive operation that is better done once outside
of the loop.
Why don't you just say
print "$server,$cpglogline\n" ?
Mabye because (unless you set the default filehandle using select()) the
text will end up on the screen instead of in the file?
This program makes absolutely no sense to me. What are you trying to do
exactly? Can you give a bit more description?
It is certainly somewhat cryptic.
jue
I'm connecting to many servers extracting XML data to a file, I then
only want the MAC address of Port 1 for each server. The part where I
open an existing file (output.txt) and dump content into blah.txt is
for testing, once the script it working I will remove that portion as
the output.txt file will be different for each server.
Hope that helps. I'll look into the push.
Thanks
.
- References:
- Need help with a question.
- From: Trev
- Re: Need help with a question.
- From: Ben Morrow
- Re: Need help with a question.
- From: Trev
- Re: Need help with a question.
- From: Anonymous coward
- Re: Need help with a question.
- From: Jürgen Exner
- Need help with a question.
- Prev by Date: Re: Need help with a question.
- Next by Date: Re: Need help with a question.
- Previous by thread: Re: Need help with a question.
- Next by thread: Re: Need help with a question.
- Index(es):
Relevant Pages
|