Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: I love perl but....

by jeroenes (Priest)
on May 22, 2001 at 14:10 UTC ( [id://82197]=note: print w/replies, xml ) Need Help??


in reply to I love perl but....

I guess we share our love ;-).

Embedding perl in html can be done, but the reverse is more versatile. Generate HTML with perl! Look at CGI and the Template toolkit for convenient methods.

Including is no problem at all. Example:

open INCL, "path_to_include_file"; { local $/ = undef; print <INCL>; } close INCL;
The local and {} make the code cleaner, it works even without them.

On unix, you can also use the following shorthand:

print `cat path_to_include_file`;
Hope this helps,

Jeroen
"We are not alone"(FZ)
Fixed error. See Why or why not? - local undef $/

Replies are listed 'Best First'.
Re: Re: I love perl but....
by japhy (Canon) on May 22, 2001 at 19:49 UTC

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others romping around the Monastery: (6)
As of 2024-03-28 19:06 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found