I know Perl doesn't have an #include directive.
Sure it does. the -P flag to perl runs the code through cpp first. Here's a quick example:
#!/usr/bin/perl -Pw use strict; #define CHOICE 1 print "Hey look! I'm", #ifndef CHOICE ' not', #endif " using the C preprocessor.\n"; # Here is an example of #include. my $passwd = <<'-PASSWD-'; #include "/etc/passwd" -PASSWD- print "Here is /etc/passwd: $passwd\n";
note -P can have problems distinguishing between preprocessor directives and perl comments. Also I don't know how well it works on non-Unix platforms where cpp might be missing. All in all it's a poor solution to your problem but it's there if you do need to us it.
--
જલધર
In reply to Re: organizing large flat modules? use, require, do, ...
by jaldhar
in thread organizing large flat modules? use, require, do, ...
by halley
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |