Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?

Re: File::Find in a loop

by tobyink (Abbot)
on Apr 29, 2013 at 00:40 UTC ( #1031132=note: print w/ replies, xml ) Need Help??

in reply to File::Find in a loop

I have no idea why so many people actually go to the trouble of creating an actual sub in their code called "wanted". Pass a coderef...

use strict; use warnings; use File::Find; my @dir = qw( N:/TMP N:/TMP_2 ); for my $dir (@dir) { find(sub { print "[$dir] $File::Find::dir $File::Find::name\n"; }, $dir); }
package Cow { use Moo; has name => (is => 'lazy', default => sub { 'Mooington' }) } say Cow->new->name

Comment on Re: File::Find in a loop
Download Code

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (6)
As of 2015-11-29 23:25 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (754 votes), past polls