Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: Help with $File:Find

by huck (Prior)
on Feb 14, 2018 at 18:32 UTC ( [id://1209162]=note: print w/replies, xml ) Need Help??


in reply to Help with $File:Find

push @array, $File::Find::name if (defined $_ && (/^.*\.($TYPES)$/i) +);

Replies are listed 'Best First'.
Re^2: Help with $File:Find
by tinita (Parson) on Feb 14, 2018 at 19:27 UTC
    It would be interesting to find out, though, when $_ an actually be undef. I can't find anything about that in the File::Find documentation. I only see a case where $File::Find::fullname is documented to be undef.
Re^2: Help with $File:Find
by roperl (Beadle) on Feb 14, 2018 at 18:58 UTC
    Ok I was thinking that but I wasn't sure if needed to check if $File::Find::name was defined.
    So I can write it as:
    push @array, $File::Find::name if ( ($_) && (/^.*\.($TYPES)$/i) );

    that is they syntax I've been using to check for defined without actually using "defined"

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others lurking in the Monastery: (6)
As of 2024-04-25 14:02 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found