in reply to Re^3: how to create makefile?
in thread how to create makefile?

so, do I not have to use

use ExtUtils::MakeMaker; WriteMakefile( NAME => 'myPgm', VERSION => .... );

with your code for the make or they are 2 different things? If different, how to run yours, just by typing make or perl fileName.PL?

Replies are listed 'Best First'.
Re^5: how to create makefile?
by Corion (Patriarch) on Jan 09, 2015 at 09:41 UTC

    No. ExtUtils::MakeMaker is for creating a Makefile for module installation.

    If your process is not about module installation for Perl, ExtUtils::MakeMaker is the wrong tool.

    Maybe now it's time for you to explain what the actual goal is and why you think that a Makefile is the appropriate tool.

      well, as I said, the purpose was to run the script automatically and I got the idea from the makefile that is used for c programs in which we list all c programs, compile, create obj file and then, run the executable. but as I said, perhaps I wrongly made the analogy with the perl makefile.

        Unlike C, Perl uses "Just in Time" compiling. So you only need to:

        perl pgm.pl perl pgm2.pl

        If you need to only run pgm2.pl when pgm.pl completes successfully, then in most shells:

        perl pgm.pl && perl pgm2.pl

        will do that.