Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked

Re: Totally Befuddled With (Lack of) Text Output

by kyle (Abbot)
on Sep 12, 2008 at 18:47 UTC ( #710973=note: print w/replies, xml ) Need Help??

in reply to Totally Befuddled With (Lack of) Text Output

I don't see the problem with the code you've posted, but it might help to check that open and close succeed.

open(...) or die "Can't append '$dir/$file': $!"; # ... close(...) or die "Fail on close: $!";

You can even check print the same way, if you're so inclined. Don't forget to include $! in the error message; it's the most informative part.

Replies are listed 'Best First'.
Re^2: Totally Befuddled With (Lack of) Text Output
by o2bwise (Scribe) on Sep 12, 2008 at 19:40 UTC
    Thank you and I'll try that check for succesful opening!

      You might also want to check that the print is succeeding; one possibility would be a full disk or a quota error resulting in not writing the whole thing. Check the close, too; sometimes output errors are deferred to the close (when all the buffers are flushed).

      Also check the size of the file to make sure it's what you expect. It's possible for certain control characters to sneak into a file and make it look different on the screen than what's actually on the disk (like ^H).

      Hope this helps!

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (2)
As of 2020-12-04 03:02 GMT
Find Nodes?
    Voting Booth?
    How often do you use taint mode?

    Results (58 votes). Check out past polls.