in reply to question n File::Find
Here are some of the things I spotted in your wanted sub. open temp_file_cy, "$File::Find::name;
- I think you want to use a lexical variable my $temp_file_cy instead of a bareword temp_file_cy as your file-handle
- then, "$File::Find::name has only one quote at the beginning.
- If you may, use 3 agrument open function, then check error if file is not opened
- I will advise you use warnings and strict in your script. As it shows several 'mis-typed' variables. It will help alot
With a second check on the usage of the file test using "-r" in this line:
print "hello 1\n" if (-r tep_file_cy); check perldoc -f -r
-r File is readable by effective uid/gid.
If 'tep_file_cy' is the file you trying to check up, not been used as file-handle.
Except, you have something else in mind.
If you tell me, I'll forget.
If you show me, I'll remember.
if you involve me, I'll understand.
--- Author unknown to me
If you show me, I'll remember.
if you involve me, I'll understand.
--- Author unknown to me
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: quston n File::Find
by skyworld_chen (Acolyte) on Oct 30, 2012 at 12:09 UTC | |
by aitap (Curate) on Oct 30, 2012 at 17:02 UTC | |
by skyworld_chen (Acolyte) on Oct 31, 2012 at 01:22 UTC |
In Section
Seekers of Perl Wisdom