chdir('') has been deprecated... #### #!perl -l BEGIN { $| = 1; } use autodie; use strict 'refs'; use warnings FATAL => 'syntax'; use Data::Dumper::Concise; use File::Glob ':globally'; use Memoize; memoize('no_bug', LIST_CACHE => 'MEMORY'); no_bug(); sub no_bug { my(@md) = (1..305); my(@mp) = (1000..1205); print "market detail: ", scalar(@md); print "market price: ", scalar(@mp); my $path = '/tmp/xx'; foreach my $md(@md) { &open(my $f, '<', $path); &close($f); } foreach my $mp(@mp) { &open(my $f, '<', $path); &close($f); } chdir '/tmp/xx'; my(@sources) = <~$path/mp_*>, <~$path/md_* >; print Dumper(scalar @sources); }