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

Re: Re: Re: Re: File::Find incompatible with OO perl?

by vaevictus (Pilgrim)
on Feb 10, 2004 at 05:38 UTC ( #327820=note: print w/replies, xml ) Need Help??


in reply to Re: Re: Re: File::Find incompatible with OO perl?
in thread File::Find incompatible with OO perl?

wanted(), being the non-OO answer, is supposed to recieve a file name via $_. Check the perldoc, it backs me up. Not that I'm saying its the best way that this should have been done, but find is supposed to produce 3 elements for your called subroutine:

  • $File::Find::name => Path + Filename.
  • $File::Find::dir => Path
  • $_ => Filename

I'm not sure whether it clashes or agrees with your statement. Regardless, I'm getting the data as I think it works, like this:

Calling:

find(sub{$obj->found($_)},"dir");

Called:

sub found { my $self=shift; my ($full_name, $file_dir,$file_name) = ($File::Find::name,$File::F +ind::dir,@_); }

Thanks again!!

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (1)
As of 2022-01-19 00:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    In 2022, my preferred method to securely store passwords is:












    Results (54 votes). Check out past polls.

    Notices?