Another entry level question:
A simple code named tt.pl:
And here is the output:
=======================
The code was run under tcsh on Solaris.
What did I missing here?
Thanks for the help.
A simple code named tt.pl:
Code:
my $sysf = '/export/myhome/.cshrc';
my $cmd = "source $sysf";
if(-e $sysf) {
print "found '$sysf'\n";
print "\$cmd = $cmd\n";
system($cmd);
}
print "done\n";
And here is the output:
=======================
Code:
% tt.pl
found '/export/myhome/.cshrc'
$cmd = source /emc/yanc2/.cshrc
[COLOR=red][b]Can't exec "source": No such file or directory at ./source.pl line 12.[/b][/color]
done
The code was run under tcsh on Solaris.
What did I missing here?
Thanks for the help.