Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight

Re: (tye)Re: unexpected close() success on (non-) filehandle

by mkmcconn (Chaplain)
on Nov 21, 2001 at 23:29 UTC ( #126828=note: print w/replies, xml ) Need Help??

in reply to (tye)Re: unexpected close() success on (non-) filehandle
in thread unexpected close() success on (non-) filehandle

yes, stringy file handles suck and use strict doesn't always protect you from them. And that protection is even inconsistant, as you noted... tye

That's what I wanted to know tye, thanks. That is, I recognized that the behavior I illustrated was caused by the way that the hash was constructed and used, which magnified the ambiguity of globs and strings (which I did to try to clarify my question). My focus was on why the 'protection' of the strict pragma "didn't work" sometimes. I assumed that use strict;, turning on perl's ability to decide the difference between 'F' and *main::F, would always work. When it didn't work with complete consistency, I wanted to understand why.

So, I guess what I've learned from the discussion here is that there are some limits to perl's amazing context sensing abilities, but there is no need to approach that horizon, even when those limits are restrained by strict. Saying more explicitly what I mean can be an important help in assuring that the code will do exactly what I mean

Thanks to all for all of your patience and helpful comments

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (5)
As of 2023-03-28 21:46 GMT
Find Nodes?
    Voting Booth?
    Which type of climate do you prefer to live in?

    Results (69 votes). Check out past polls.