in reply to Multiple Files, One Script Possible?

Something like the following will work:
#!/usr/bin/perl use 5; use warnings; use strict; require "part1.pl"; require "part2.pl"; require "part3.pl"; require "part4.pl";
but I wouldn't use 'include' files in C like this either.

Replies are listed 'Best First'.
Re^2: Multiple Files, One Script Possible?
by ikegami (Patriarch) on Feb 28, 2008 at 22:39 UTC
    Without packgages, do is more appropriate than require. Either way, it's just bad code.
Re^2: Multiple Files, One Script Possible?
by alexm (Chaplain) on Feb 28, 2008 at 21:18 UTC
    TMTOWTDI, and this works but I wouldn't do it either... ;)
    $ cat part1.pl part2.pl part3.pl part4.pl | perl
    IMHO, refactoring a large, one file only program by using modules seems the best course of action in the long term.