Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re^3: Yet another Can't locate object method question

by nemesdani (Friar)
on Mar 17, 2012 at 06:23 UTC ( #960133=note: print w/ replies, xml ) Need Help??


in reply to Re^2: Yet another Can't locate object method question
in thread Yet another Can't locate object method question

Thank you for your answer and solution. It works of course, but one thing is not clear to me: $self->{fh} seems to pop out of nowhere. Is it a filehandle which is immediately bound to $self?


Comment on Re^3: Yet another Can't locate object method question
Re^4: Yet another Can't locate object method question
by choroba (Abbot) on Mar 17, 2012 at 08:07 UTC
    From where do you think OUT pops out in
    open OUT, '<', $file;
    $self is a hash ref, $self->{fh} does not exist, so it is created by Perl when calling open, and the filehandle is assigned to it.
      Clear now :). Thanks.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (8)
As of 2014-09-01 08:06 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (299 votes), past polls