Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: Working with word document

by aitap (Deacon)
on Aug 28, 2012 at 13:42 UTC ( #990248=note: print w/ replies, xml ) Need Help??


in reply to Working with word document

If you want to copy Word files manually, you'll have to remember that these are binary files. Thus,

  • Use binmode on your filehandles to ensure that Windows won't break the document by "fixing" newline symbols.
  • Newlines in binary documents don't usually represent newlines in their contents, so it may be useful to use read, not readline (which is the synonym for <>).
  • Don't modify data you're copying in any ways unless you know what you're doing ("$_\n" is not a good thing in case of binary files).
Sorry if my advice was wrong.


Comment on Re: Working with word document
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (3)
As of 2014-12-29 02:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (184 votes), past polls