Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re^5: Most efficient way to remove some text from a string

by Marshall (Canon)
on Dec 07, 2016 at 02:36 UTC ( [id://1177360]=note: print w/replies, xml ) Need Help??


in reply to Re^4: Most efficient way to remove some text from a string
in thread Most efficient way to remove some text from a string

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.

  • Comment on Re^5: Most efficient way to remove some text from a string

Log In?
Username:
Password:

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

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

    No recent polls found