The problem here is the glob:sub dvdr1_readvarsfromfile { my($filename, $fn); &dvdr1_initblankvars; $filename=$numerodaficha; if (length($filename)<6){ if ($filename<10) {$filename="00000".$filename} elsif ($filename<100) {$filename="0000".$filename} elsif ($filename<1000) {$filename="000".$filename} elsif ($filename<10000) {$filename="00".$filename} elsif ($filename<100000) {$filename="0".$filename} } $codnum=$filename; if ($_[0] eq ""){ $filename=glob("$dvdr1orderdb_path\/$codnum.*"); } else{ $filename="$_[0]"; } open (DB, "$filename") || (&erro("$!") && die); $fn=$filename; ...
when I call:
&dvdr1_readvarsfromfile the first time, the glob always finds the correct file.
When I call it the second time, even though I'm looking for a different file, and the value of $numerodaficha is different, glob always returns blank. Why and how can I solve it?
Thanks!
Edit kudra, 2001-10-02 Moved plaintext out of code tags
In reply to glob problem... by LFonseca
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |