Welcome to the Monastery | |
PerlMonks |
[SOLVED]: Using glob in file test gives "Use of uninitialized value in -e" warning.by Perl300 (Friar) |
on Dec 06, 2017 at 21:19 UTC ( [id://1205053]=perlquestion: print w/replies, xml ) | Need Help?? |
Perl300 has asked for the wisdom of the Perl Monks concerning the following question:
Hello, I know this might be something basic that I am unable to see.
On Linux with perl v5.24.0, I want to check if any files exist whose names start with a specific string. So first I tested it on command line and it seemed working fine there: It prints 1 if any file exist with name starting with "test" under /abc/def/ghi directory and blank if such file doesn't exist. But when I use same in program like: I get warning (I think it's warning) when I run the program as: Use of uninitialized value in -e at ./script_name.pl line 4.
Which variable is uninitialized here? Is it $_?
Thank you for your time! EDIT: Changed subject line to solved!
Back to
Seekers of Perl Wisdom
|
|