Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: Why do I need a space here?

by pogo (Initiate)
on Jun 28, 2002 at 19:25 UTC ( [id://178113]=note: print w/replies, xml ) Need Help??


in reply to Why do I need a space here?

Thanks to all for their offerings, but I am yet joyless. I have tried the first four suggestions here...They work for you but not for me. Perhaps a tad more info might help our mutual enlightenment. Linux 2.4.3-20SMP (dual cpu), Mandrake 8.0, Perl 5.6.0 The file begins with
#!/usr/bin/perl -w use strict; use Getopt::Long; use File::Path;
and the var i$ is
my($i);
although I can reproduce the problem without i$ as in:
print OUTFILE "\< \/HTML\>\n"; print OUTFILE "\<\/HTML\>\n";
where the first case prints and the second doesn't. Manifestly, this should work as you have all suggested, examples abound. Any other suggestions? pax pogo

Replies are listed 'Best First'.
Re: Re: Why do I need a space here?
by DamnDirtyApe (Curate) on Jun 28, 2002 at 19:41 UTC

    For debugging purposes, would you disable output buffering with $|++ near the beginning of your script, then try printing to STDOUT instead of a filehandle?

    Thanks,
    _______________
    D a m n D i r t y A p e
    Home Node | Email
Re: Re: Why do I need a space here?
by Fastolfe (Vicar) on Jun 28, 2002 at 22:00 UTC
    It looks like your script might be pretty long. Please try removing a bunch of stuff from it so that you can reduce your script to a simple test case. You may figure out your problem between now and then, but if you end up with a very small script that still exhibits this problem, please post it in this thread.

    What you're describing doesn't make a lot of sense, unfortunately. I suspect there's something else going on. There should be no reason a space in this fashion should affect whether or not your output gets written.

    Be sure, though, that if you're writing to a file that you're checking the file's contents only after your script closes the filehandle. Buffering may delay the actual writing of data to a file until it's closed.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://178113]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others meditating upon the Monastery: (6)
As of 2024-04-23 20:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found