Re: Including text files in Modulesby tfrayner (Curate)
|on Nov 05, 2004 at 16:58 UTC||Need Help??|
I've just had to figure this out myself recently. The following feels like a bit of a hack, but it does work:
It uses the __FILE__ literal which always points at the current filename (see perldoc perldata). So you can put your file.txt file in the same directory as your module.pm and the module should always be able to find it.