perly_newbie has asked for the wisdom of the Perl Monks concerning the following question:
hello,
Id like to know how to run a perl file from within a perl file. From cmd line it is easy: I can go to a folder in C and run ABC.pl with options like
"
" I am having problem passing these arguments (com1@115200 65) from within another perl file. I am trying to use: "ABC.pl com1@115200 65
" The file can be run without the arguments easily. Plz let me know what is going on.my @args=(0); my $ filename = "ABC.pl"; @args = ("$filename com1@115200 65"); system(@args) == 0 or die "system @args failed: $?"; "
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: running a perl file from within a perl file
by ikegami (Patriarch) on Dec 17, 2009 at 02:50 UTC | |
Re: running a perl file from within a perl file
by brap (Pilgrim) on Dec 17, 2009 at 02:47 UTC | |
by perly_newbie (Novice) on Dec 18, 2009 at 03:41 UTC | |
Re: running a perl file from within a perl file
by matze77 (Friar) on Dec 17, 2009 at 12:46 UTC | |
by perly_newbie (Novice) on Dec 17, 2009 at 19:00 UTC |
Back to
Seekers of Perl Wisdom