http://qs321.pair.com?node_id=763973

antidote1316 has asked for the wisdom of the Perl Monks concerning the following question:

The problem is that its not reading from the directory...its saying that permission is denied...can someone tell me if there is something wrong with the format...my regex is correct..
#!/usr/bin/perl opendir (DIR, "C:/Perl/bin/Anti") or die "Couldnt open directory: $!"; @files = readdir DIR; closedir (DIR); foreach $file (@files) { open(MYFILE,"C:/Perl/bin/Anti/$file") or die "Count open file :$!"; while(defined($ips=<MYFILE>)){ @array = $ips =~ m/\d+/; for($index=0; $index<@array; $index++) { for($count=0; ;$count++) { print "IP $count is $array[$index] \n"; last; } } } }