- or download this
#!/usr/bin/perl
...
sub wanted {
$dir = $File::Find::name if ( /hello\.txt/ );
}
- or download this
...
find( \&{ $dir = $File::Find::name if ( /hello\.txt/ ) },
'/tmp/test' );
- or download this
#!/usr/bin/perl
...
sub wanted {
return $File::Find::name if ( /hello\.txt/ );
}