Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: Totally Befuddled With (Lack of) Text Output

by kyle (Abbot)
on Sep 12, 2008 at 18:47 UTC ( [id://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!

    Tony
      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?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others lurking in the Monastery: (3)
As of 2024-04-25 22:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found