Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

problems with system()

Status
Not open for further replies.

Vagabundo

Programmer
Oct 31, 2002
10
0
0
DO
HI,
I am not so good in perl, but I need to use system() to initiate another program from my script with a lot of parameters. All this works fine, but there is one line that is not working again the special characters.
How can I get this line in a variable which is working with system():
$zwxt = "-F From: TestServer|%%c|Page: %%P of %%T";

Who can help?
regards
Christian
 
You need to escape special characters, you can do this by prefixing \ before the characters, or you can use the quote operator
Try ...
$zwxt = "-F From: TestServer\|\%\%c\|Page: \%\%P of \%\%T";

HTH
--Paul


It's important in life to always strike a happy medium, so if you see someone with a crystal ball, and a smile on their face ...
 
Thanks Paul,
but it does not work. But I use the original string from sendfax

sh: line 1: %%c: command not found
sh: line 1: Page:: command not found
sendfax: No destination specified.
usage: sendfax [options] [files]
(Read the manual page; it's too complicated).

I don't know what happens.
Christian
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top