laziness, impatience, and hubris | |
PerlMonks |
Re^5: Most efficient way to remove some text from a stringby Marshall (Canon) |
on Dec 07, 2016 at 02:36 UTC ( [id://1177360]=note: print w/replies, xml ) | Need Help?? |
You can do that. However the file with the .docx extension will not work as a MS Word file because that file will be a simple text file, not a Microsoft document file. You can tee to say, "Blah.txt". Open "Blah.txt" in MS word, then execute a macro by perhaps typing Ctl-M for "Music". That macro reformats the input into Word format which can be saved in a next step or it can be automatically be saved as Blah.docx in Word format. It is possible in Word to have "auto-run" macros which do things when a particular type of file is opened. But that can be a security risk. I suspect that what you need is a "glue piece of Perl" that makes a text file. Then manually open that text file in Word, "hit CTL-M" to re-format and then save the file in Word format or do what your want to do with it. You should say for performance, things like: "I want to do this one time only", "I need to do this once per week", "I need to update a webpage every second", etc.
In Section
Seekers of Perl Wisdom
|
|