<?xml version="1.0" encoding="windows-1252"?>
<node id="813123" title="Re: running a perl file from within a perl file" created="2009-12-16 21:47:49" updated="2009-12-16 21:47:49">
<type id="11">
note</type>
<author id="803845">
brap</author>
<data>
<field name="doctext">
&lt;code&gt;
# 813119.pl:
my @args=(0);
my $ filename = "ABC.pl";
@args = ("$filename com1@115200 65");
system(@args) == 0 or die "system @args failed: $?";
&lt;/code&gt;
&lt;p&gt;&lt;/p&gt;
&lt;code&gt;
# ABC.pl:
print join( ' / ', @ARGV), "\n";
&lt;/code&gt;
Mostly works for me.  ABC.pl gets called, and displays
&lt;code&gt;
com1 / 65
&lt;/code&gt;
I'd recommend quoting the '@' character in your @args assignment, as in:
&lt;code&gt;
@args = ("$filename com1\@115200 65");
&lt;/code&gt;
Which changes the output to
&lt;code&gt;
com1@115200 / 65
&lt;/code&gt;
What output are you seeing?  Which version of perl (perl -V)?
</field>
<field name="root_node">
813119</field>
<field name="parent_node">
813119</field>
</data>
</node>
