sending command line arguements to HTML Tidy

D

d davis

I realize that I am getting way ahead of myself. I am studying Learning Perl
Win32, Programming Perl and Mastering Perl Tk.
For a practical example that I can see that works doing something that I
need done, I want to basically execute HTML Tidy using arguments that I send
to the command line from Perl.

the configuration file config.txt, and the error file errs.txt, and tidy.exe
are in the folder C:/tidyfiles.
the htm files are in C:/tidyfiles/target/*.htm

Executing from the command line:
tidy -config config.txt -m -f errs.txt C:/tidyfiles/target/*.htm

Tidies all of the target htm files, OK.

what would be the correct syntax for my perl script?

#!/usr/bin/perl # redundent on my Win32
system ("tidy", "-config","config.txt","-m","-f","errs.txt",
"C:/tidyfiles/target/*.htm");

seems to work but somehow looks ugly.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,053
Latest member
BrodieSola

Latest Threads

Top