in reply to searching files

Use a regex of some sort...

# Untested for file name with space. $base_name =~ m{ \A $input some-fixed-string .*? [.]pdf \z }x;

Replies are listed 'Best First'.
Re^2: searching files
by michael99 (Acolyte) on Mar 05, 2020 at 06:24 UTC

    I tried this and is working. Thank you. However, when i use -e to test it, seems not working. Could you pointed me out?

    if (-e m{ \A $input some-fixed-string .*? [.]pdf \z }x} .. }