sending command line arguements to HTML Tidy

Discussion in 'Perl' started by d davis, Apr 27, 2004.

  1. d davis

    d davis Guest

    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.
     
    d davis, Apr 27, 2004
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Rob Meade
    Replies:
    5
    Views:
    468
    Rob Meade
    Dec 5, 2005
  2. Ganesh Gella
    Replies:
    2
    Views:
    339
    John Harrison
    Nov 2, 2004
  3. Dawn Minnis
    Replies:
    9
    Views:
    387
    Dave Thompson
    Feb 28, 2005
  4. Replies:
    40
    Views:
    894
    Michael Wojcik
    Jul 25, 2006
  5. Replies:
    1
    Views:
    132
    Ben Morrow
    Nov 10, 2006
Loading...

Share This Page