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

Re: Perl equivalent of C's #include

by athomason (Curate)
on Aug 25, 2000 at 09:35 UTC ( [id://29583]=note: print w/replies, xml ) Need Help??


in reply to Perl equivalent of C's #include

Your problem is much more easily and cleanly solved by the above answers, so use those. This is just an academic comment ;-).

<don't do this>

Perl can actually use the C preprocessor if you invoke the interpreter with the -P flag. Then your #includes and other such C pragmas will work. However, as is typical for Perl, the kludgely preprocessor directives have been superceded by more Perlish (i.e., easier, safer, more huggable) constructs. #define constants should use the const module; #includes should be replaced by real modules with use or require. Since these aren't preprocessor directives, #ifdefs are unnecessary.

</don't do this>

Log In?
Username:
Password:

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

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

    No recent polls found