in reply to Multiple file handles
using one file to reference zip codesInstead of Spreadsheet, INI file maybe a lite weight alternative. The content may be look like:
Then your Perl script:code1 = state 1 code2 = state 2 ...
Code not tested, but the idea is like that. CPAN Config::Tinyuse strict; use Config::Tiny; my $Config = Config::Tiny->read( 'ZipCodes.ini' ); sub check { my $code = shift; return $Config->{_}{$code} or die "No such code '$code' "; } my $st_name = check ( $code ) ;
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Multiple file handles
by stevieb (Canon) on Feb 03, 2023 at 17:09 UTC | |
by MoodyDreams999 (Scribe) on Apr 07, 2023 at 21:44 UTC | |
by 1nickt (Canon) on Apr 08, 2023 at 10:41 UTC | |
by MoodyDreams999 (Scribe) on Apr 13, 2023 at 17:26 UTC | |
Re^2: Multiple file handles
by MoodyDreams999 (Scribe) on Apr 07, 2023 at 21:37 UTC |