My system admin has me coding on a Redhat Enterprise 5 box. I keep having weird issues with his config and i've been fighting through each one-at-a-time. He knows soo much more than me about Linux, but he doesn't know perl (weird i know).
On his machine in Perl 5.6 or perl 5.8 this code:
opendir Tdir, "/path/to/anywhere";
my $dir = readdir(Tdir);
while($dir = readdir(Tdir)){
print "$dir\n";
}close Tdir;
outputs folder contents minus one file.
Additionally, it also outputs "." and ".." in the array.
Every other linux system i've been on usally just outputs the ".."
Does anyone know why i am missing a file?
SysAdmin tells me i cannot use readdir but i consider it a core function in my code i am really wondering why this is now a problem.
Can anyone confirm this error? Anyone have any advice?
Thanks for attention,