Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
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 studying the Monastery: (4)
As of 2014-07-12 21:02 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    When choosing user names for websites, I prefer to use:








    Results (241 votes), past polls