in reply to HTML INCLUDES
Beware that @chunks may contain an odd number of elements, so $inc may be empty on the last iteration.my @chunks = split(/<!--#include virtual="([^"]+)" -->/, $data); while (@chunks) { # ought to splice here my ($html, $inc) = (shift @chunks, shift @chunks); # print $html to file # include $inc if possible }
It's not the *best* way to do it, but it's one way to do it.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: HTML INCLUDES
by vbrtrmn (Pilgrim) on Apr 30, 2001 at 23:07 UTC |