Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: How to include files in perl?

by perlsen (Chaplain)
on Mar 02, 2006 at 14:01 UTC ( [id://533883]=note: print w/replies, xml ) Need Help??


in reply to How to include files in perl?

Hi,
Try this,
undef $/; open (FILE,"/path/to/header.html"); my $file = <FILE>; close(FILE); print "$file";

Or Just Try for this links:
  • PHP include Modules
  • Include Virtual Files

  • Regards,
    Perlsen

    Replies are listed 'Best First'.
    Re^2: How to include files in perl?
    by wee (Scribe) on Dec 04, 2008 at 17:55 UTC
      Using open without die is like making a peanut butter and jelly sandwich without peanut butter. You might not get what you expect.

    Log In?
    Username:
    Password:

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

    How do I use this?Last hourOther CB clients
    Other Users?
    Others about the Monastery: (4)
    As of 2024-03-29 08:05 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?

      No recent polls found