
benchivers
Novice
Apr 15, 2002, 1:43 PM
Post #1 of 5
(278 views)
|
|
Reading Web Pages with Variables!
|
Can't Post
|
|
I am making a cgi program, where the program reads the html code from a web page, and then prints the html code on screen, like so: open(HTML,"<file.htm"); @data = <HTML>; close(HTML); print "@data"; I have placed variables within this web page like: $title $hyperlink $text and so on, when I use the following source code, the actual variables print out on screen, instead of what they are equal to. $title = "Ben"; $hyperlink = "www.hyperlink"; $text = "hello!"; open(HTML,"<file.htm"); @data = <HTML>; close(HTML); print "@data"; does anyone know how to print the variables on screen as what they are equal to, and not the actual variable word itselfs. The file must be opened and read from. I think it can be solved using the substitute method or something like it, but I don't know how it works. I hope this all makes sense! I would appreciate any help! Regards, Ben Chivers Wheres the damn coffee? zzzZZZZZ!!!
|