dicty has asked for the wisdom of the Perl Monks concerning the following question:
Question1: I use system call to create a soft link in my Perl code below:
system("ln -s $file1 $file2");
$file2 is not created, why? The same system call works for some other files within the same perl script, Why?
Question2, For $file2 above, when I use code below for testing,
"if (-e $file2) { print "testing output"; }"
"testing output" is printed, looks like $file2 does exit, but when I cannot file $file2 with "ls", and the following perl code cannot find $file2 either.
Is there any explanation for that?
Thanks a lot!
Dicty
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: system and -e question
by 2teez (Vicar) on Dec 29, 2012 at 05:23 UTC | |
by afoken (Chancellor) on Dec 29, 2012 at 18:25 UTC | |
Re: system and -e question
by toolic (Bishop) on Dec 29, 2012 at 00:40 UTC | |
Re: system and -e question
by syphilis (Archbishop) on Dec 29, 2012 at 04:36 UTC | |
by dicty (Sexton) on Dec 31, 2012 at 20:21 UTC | |
Re: system and -e question
by 7stud (Deacon) on Dec 29, 2012 at 04:58 UTC |
Back to
Seekers of Perl Wisdom