in reply to variable insertion

Using HTML::TokeParser you can grab the SSI and then split it on the --s to grab the variable:

use diagnostics; use strict; use warnings; use HTML::TokeParser; my $p = HTML::TokeParser->new("ssi.html") || die $!; my $randomVar; while (my $token = $p->get_token) { my $tokenType = shift @{$token}; if ($tokenType eq "C") { # add another loop in to check if it's the right ssi my @parts = split /--/, shift(@{$token}); $randomVar = $parts[2]; } } print $randomVar, "\n";

Hope that helps.

Replies are listed 'Best First'.
Re: Re: Parsing Server Side Includes
by wolverina (Beadle) on Nov 22, 2002 at 06:17 UTC
    thanx... it did. :) Lisa