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

Re^8: Spot the bug

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


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 23, 2005 at 04: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
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others goofing around in the Monastery: (4)
As of 2024-03-29 14:28 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found