in reply to [SOLVED]: Using glob in file test gives "Use of uninitialized value in -e" warning.
glob returns a list of file names. Combine it with grep:
/etc>ls pa* passwd passwd- passwd~ /etc>perl -E 'say for grep { -e $_ } glob "pa*"' passwd passwd- passwd~ /etc>
Alexander
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Using glob in file test gives "Use of uninitialized value in -e" warning.
by choroba (Cardinal) on Dec 07, 2017 at 13:20 UTC | |
by afoken (Chancellor) on Dec 07, 2017 at 20:42 UTC |