l_millr has asked for the wisdom of the Perl Monks concerning the following question:
I have also tried ./acme.config. I do not want to put a hard path in because this will surely break under various module installation schemas. The file is read-only and static, and I would prefer it live in the module directory.#!/usr/local/lib/perl sub get_config { my $CONFIGPATH = 'acme.config'; open (CONFIG,$CONFIGPATH) or die "$0: File '$CONFIGPATH': $!\n"; undef $/; my $c=<CONFIG>; close CONFIG; return chomp($c); }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Read a static file from module directory
by Fletch (Bishop) on Nov 29, 2001 at 21:27 UTC | |
|
Re: Read a static file from module directory
by DrManhattan (Chaplain) on Nov 29, 2001 at 21:51 UTC | |
by l_millr (Initiate) on Nov 30, 2001 at 03:04 UTC | |
|
Re: Read a static file from module directory
by mpeppler (Vicar) on Nov 30, 2001 at 00:46 UTC | |
|
Re: Read a static file from module directory
by Fastolfe (Vicar) on Nov 30, 2001 at 00:38 UTC |