Skip to content

Instantly share code, notes, and snippets.

Avatar

Bill Costa Bill-Costa

View GitHub Profile
@Bill-Costa
Bill-Costa / car-options.pl
Last active Feb 28, 2021
Toy demo program illustrating the use of a multi-dimensional associative array (hash) as a sparse lookup table.
View car-options.pl
#!/usr/bin/env perl
#
# File: car-options.pl
# Abstract: Demonstrate sparse lookup table as multi-dimensional hash.
# Usage: ./car-options [keyword ...]
# Author: Bill.Costa@alumni.unh.edu
# License: Perl Artistic
# See: https://dev.to/billcosta/way-too-many-if-then-elses-try-a-lookup-table-3j2o
# Beware: https://perlmaven.com/autovivification
#