Re: File test failed!

2011-09-16 Thread Magnus Woldrich
On 2011-09-16 17:53, y...@eisoo.com wrote: I want to test if a file exists or it is a link or not You test for a regular file with -f. You test for existance with -e. You test for symbolic links with -l. See perldoc -f -x for more information. -- │ Magnus Woldrich │ m...@japh.se │ http:/

Re: File test failed!

2011-09-16 Thread Shlomi Fish
Hi YYQ, On Fri, 16 Sep 2011 17:53:25 +0800 "y...@eisoo.com" wrote: > Hi, All: > > I want to test if a file exists or it is a link or not, the code is: > #!/usr/bin/perl -w > > use strict; > use File::Basename; > use File::stat; > use Fcntl ':mode'; > > my $elfobj = $ARGV[0]; > > sub str

File test failed!

2011-09-16 Thread y...@eisoo.com
Hi, All: I want to test if a file exists or it is a link or not, the code is: #!/usr/bin/perl -w use strict; use File::Basename; use File::stat; use Fcntl ':mode'; my $elfobj = $ARGV[0]; sub strtrim () { #. } sub copyfile () { #. } my @deps = `ldd $elfobj`; foreach my $li