Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

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

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1031132]
help
Chatterbox?
[shmem]: and - on another side: a complete spec is identical to the programs source code
[shmem]: it is just written in another language
[choroba]: that's why we have agile - we don't have any spec
[shmem]: I'm a bit scared by agile (agile imposition) - but then it is crucial how it is lived to crucified or not
[shmem]: s/to cru/to be cru/
[moritz]: agile itself is pretty straight forward: faster feedback loops, working in smaller increments, regularly reflect and try to improve your process
[moritz]: it's just some implementations of agile that are scary

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (7)
As of 2017-04-27 14:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I'm a fool:











    Results (508 votes). Check out past polls.