Hi all,
I'm having a problem solving this one.
I need to replace/substitute a word in a text file.
The problem is that i need to keep the same amount of characters as the
replaced word.
This is for replacing words in a template/postscript file that I use for
printing labels.
After upgrading the OS and CUPS printer driver, things don't work the same.
i.e
In the template text file there is a pattern #------------------# (20
characters).
if I do s/#------------------#/not ok/
it will come out wrong.
If I would substitute with a variable and add spaces for remaining
character not used.
i.e
s/#------------------#/'not ok '/
it works.
I'm hoping that someone could show me how to solve this one.
Thanks for your time.
Nisse
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/