Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

expanding SSI commands

by akm2 (Scribe)
on May 01, 2001 at 01:53 UTC ( [id://76777]=perlquestion: print w/replies, xml ) Need Help??

akm2 has asked for the wisdom of the Perl Monks concerning the following question:

I wrote a short simple perl script to read existing html files. I use $text =~ s/\$(\w+)/${$1}/g; to expand variables. Will the sime type of technique on SSIs? Want kind of expression should I use?

Replies are listed 'Best First'.
Re: expanding SSI commands
by Masem (Monsignor) on May 01, 2001 at 02:02 UTC
    If you are trying to do these by hand, you're going to quickly run into major problems with SSI inclusions like this. It's much much much better to use something like Apache::SSI if you want to use the SSI mechanism, or a template solution (HTML::Template, Template, etc etc), if you want something a bit more robust for perl to handle.


    Dr. Michael K. Neylon - mneylon-pm@masemware.com || "You've left the lens cap of your mind on again, Pinky" - The Brain
      I cant use a mod in this case. Thats why I need an expression.
        There is no reason that you can't use a module. Sure, you might not be able to install it in the standard locations, but if you find a module that you want to use, simply install it into a directory that you have control of, and then use the use lib functionality to point perl to use that.
        Dr. Michael K. Neylon - mneylon-pm@masemware.com || "You've left the lens cap of your mind on again, Pinky" - The Brain

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://76777]
Approved by root
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others musing on the Monastery: (6)
As of 2024-03-28 10:38 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found