This is a sample of text including symbols that I am trying to overwrite a file with:
Home http://domain.tld
IP|http://domain.tld/path/1
Navbar, Top|http://domain.tld/
Tips/Tricks|#some text
Accordion 2|*more text
Text|=More Text
substituting all meta-characters, e.g.,
s!\t!symTA!g
s!\#!symHA!g
This is my Perl code:
`$ps New-Item $dir -Name $file -ItemType "file" -Force -Value "$out"`
It works if $out
is just one line without any spaces, though!
But it is about 100 lines!
It is giving a variety of errors similar to the following:
The term BlogsymPIhttpsymCOLsymFSsymFSbislinks.comsymFSblog is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. At line:2 char:1 + BlogsymPIhttpsymCOLsymFSsymFSbislinks.comsymFSblog
The file is saved but with just the first line (with substitutions).