Beefy Boxes and Bandwidth Generously Provided by pair Networks Bob
Do you know where your variables are?
 
PerlMonks  

Re^8: Spot the bug

by Perl Mouse (Chaplain)
on Dec 22, 2005 at 06:48 UTC ( [id://518521]=note: print w/replies, xml ) Need Help??

This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.


in reply to Re^7: Spot the bug
in thread Spot the bug

But Perl doesn't have a 'file' as datatype. Perl has filehandles. Just like it has hashes. You can have multiple filehandles, and actions on them don't interfere. You can have multiple hashes, and actions on them don't interfere either.

And while it's true that you can open multiple handles to the same file, when was the last time you saw a program opening multiple handles on STDIN or on a socket, to name a few common streams programs read from?

Perl --((8:>*

Replies are listed 'Best First'.
Re^9: Spot the bug
by eric256 (Parson) on Dec 22, 2005 at 23:25 UTC

    You missed the point. If you have two subs that open file handles on a the same file they don't need to worry about each other. If however you have two subs that 'open' an each on the same hash, you are in serious trouble. I couldn't realy quoute you numbers on the use of either, but filehandles are certainly very different than each.


    ___________
    Eric Hodges $_='y==QAe=e?y==QG@>@?iy==QVq?f?=a@iG?=QQ=Q?9'; s/(.)/ord($1)-50/eigs;tr/6123457/- \/|\\\_\n/;print;
      No, I'm not missing the point. Unlike you, I was talking about filehandles, not files. Sure, you can open more than one handle on a file, but filehandles are used for more than files. Sockets and STDIN for instance.
      Perl --((8:>*

        Unlike you, I was talking about filehandles, not files.

        Well, you are playing semantic games. If you mean streams or sockets then talk about streams or sockets.

        ---
        $world=~s/war/peace/g

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://518521]
help
Sections?
Information?
Find Nodes?
Leftovers?
    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.