Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number

Re: Help with $File:Find

by huck (Parson)
on Feb 14, 2018 at 18:32 UTC ( #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?

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

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (4)
As of 2019-02-19 04:20 GMT
Find Nodes?
    Voting Booth?
    I use postfix dereferencing ...

    Results (101 votes). Check out past polls.