Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: 'unable to parse' error

by katgirl (Hermit)
on Aug 15, 2002 at 08:00 UTC ( [id://190334]=note: print w/replies, xml ) Need Help??


in reply to 'unable to parse' error

How about if you try what I've written below. What I've done is open the file first, then assign the contents to your header or footer. I've also put in $! after "couldn't parse" so we can see exactly what is going wrong.

Can you try that, and tell me what it says?

open (TXTFILE, "C:/My Documents/carlist/carlist_test/template/ccheader +.html"); $header_html = <TXTFILE>; close(TXTFILE); open (TXTFILE, "C:/My Documents/carlist/carlist_test/template/ccfooter +.html"); $footer_html = <TXTFILE>; close(TXTFILE); if($content=~m|<BODY.*?>(.*?)</BODY>|si) { $content = $header_html . $1 . $footer_html; $content =~ s|%title%|$title|; &save_file("$fullpath",$content); print "Completed\n"; } else{ print "Couldn't parse: $!\n"; }

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (9)
As of 2024-03-28 09:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found