<?xml version="1.0" encoding="windows-1252"?>
<node id="486206" title="Re: Best method to capture return code from system calls?" created="2005-08-24 10:37:41" updated="2005-08-24 06:37:41">
<type id="11">
note</type>
<author id="233158">
sunadmn</author>
<data>
<field name="doctext">
In my experiance with running sytem calls on SUN I have always  built my command like this:&lt;br&gt;&lt;br&gt;
&lt;code&gt;
my $cpcmd = '/bin/cp';

system($cpcmd $curfile $newfile);
&lt;/code&gt;

But there is a better way of doing this and that would be using [cpan://File::Copy] take a look at that.

&lt;div class="pmsig"&gt;&lt;div class="pmsig-233158"&gt;
&lt;B&gt;SUNADMN&lt;/B&gt;&lt;br&gt;
&lt;B&gt;&lt;I&gt;USE PERL&lt;/I&gt;&lt;/B&gt;
&lt;/div&gt;&lt;/div&gt;</field>
<field name="root_node">
486200</field>
<field name="parent_node">
486200</field>
</data>
</node>
