in reply to Use of uninitialized value for file name

When I'm stumped I often try reducing the script to the bare bones to get something working and gradually add things back in.

Something like:

#!/usr/bin/perl use warnings; use strict; my $dir = 'c:/Perl'; opendir DIR_A, $dir or die $!; while(my $job = readdir(DIR_A)){ print "$job\n"; } __DATA__ ---------- Capture Output ---------- > "C:\Perl\bin\perl.exe" _new.pl . .. bin Desktop.ini eg html lib myperl site Tidy > Terminated with exit code 0.
When you come up against the error you'll have a better chance of narrowing down the source of your grief.

Hope that helps.

Replies are listed 'Best First'.
A reply falls below the community's threshold of quality. You may see it by logging in.