in reply to Re^8: displaying html file in the browser using perl
in thread displaying html file in the browser using perl
much Ho,Ho,Ho!
When i first saw this i was concerned but didnt say anything
now remember that the htmlish command is$html =~ s{#include file="([^"]+)"}{&add_template($1)}gei
and think of what is to be replaced-from in that statement .... and then think about what is left behind. Your included text is now between <!-- -->, ie html comments!<!--#include file="somefolder/cc.html" -->
now im not great at REs, but let me suggest
( i escape things a lot 'cuz im never sure ....)$html =~ s{\<\!\-\-#include file="([^"]+)".*?\-\-\>}{&add_template($1) +}gei
edit:added ? to ".*?\-\-\>, its not good to be greedy here
|
|---|