Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
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 chanting in the Monastery: (11)
As of 2014-10-30 17:09 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    For retirement, I am banking on:










    Results (208 votes), past polls