in reply to Re: Uninitialized filehandles not as advertised?!
in thread Uninitialized filehandles not as advertised?!

maybe the problem is that you didn't show us where line 63 is in your code?

Ahhh, so sorry worthy Corion, but immediately after the <readmore> block, I stated:
where line 63 is (of course) open( my $dbh, "< $name"); almost straight out of the perldoc example.

...maybe you want to be more explicit about things going bad....

The reason I just return instead of dying is that this is an interface, and the caller can use this routine to probe different paths / filenames until it finds the right one.

And should you ask why I don't implement the search in the library, there are two answers: 1) because the caller needs to know where the data file is found, so that it can use that path to seek other files, as well, and 2) different programs calling this abstraction layer will have different search requirements.

See? It all makes sense if you look at it carefully.

  • Comment on Re^2: Uninitialized filehandles not as advertised?!