#include like in C

2004-04-21 Thread swoon
I need to include a header/boilerplate file in several Perl scripts. At this point, I'm using it as a module, but it's a big kludge. Essentially, I want the functionality that you have in C, where you can just #include the file, and it's evaluated in the scope of the file doing the #include'ing.

Re: #include like in C

2004-04-26 Thread swoon
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 >There are 4 ways to do what you want. The closest is probably 'do' > >perldoc -f do > >I would recommend the module approach as has already been suggested: > >perldoc -f use >perldoc -f require So far, "do" is looking like the best thing for the job.