B
billy
I've seen it somewhere but cannot recall.
I have a module that I call from several difference files. call it
x.pl
I need to have this module also be an executable. The part I've seen
is that there
is an eval in the file that takes the command line arguments and passes
them to the
subroutine.
????
package x;
....
`eval $0 "use x; x(@ARGV);`
I know it can be done, just not sure how.
I have a module that I call from several difference files. call it
x.pl
I need to have this module also be an executable. The part I've seen
is that there
is an eval in the file that takes the command line arguments and passes
them to the
subroutine.
????
package x;
....
`eval $0 "use x; x(@ARGV);`
I know it can be done, just not sure how.