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
In reply to Re: Using glob in file test gives "Use of uninitialized value in -e" warning.
by afoken
in thread [SOLVED]: Using glob in file test gives "Use of uninitialized value in -e" warning.
by Perl300
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |