Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: searching files

by Anonymous Monk
on Mar 05, 2020 at 04:08 UTC ( [id://11113815]=note: print w/replies, xml ) Need Help??


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} .. }

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11113815]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others meditating upon the Monastery: (7)
As of 2024-04-19 15:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found