~$ cd Sites Sites$ ls -l test.cgi -rwxr-xr-x@ 1 sandiway staff 188 Nov 9 2020 test.cgi Sites$ ls -l cmudict.cgi -rwxr-xr-x@ 1 sandiway staff 691 Oct 28 19:58 cmudict.cgi Sites$ more cmudict.cgi #!/usr/bin/perl use Lingua::EN::CMUDict; my $obj = new Lingua::EN::CMUDict; my $string = $ENV{QUERY_STRING}; my $word = $string ? $string : $ARGV[0]; # substr string, 5 remove word= my $n = $obj->number_of_syllables($word); print "Content-type: text/html; charset=utf-8\n\n"; print ''; print '

Using CMUDict from Perl

'; if ($n) { print "$word has $n syllable(s).
"; my $pron = $obj->get_word($word); print "$pron
"; } else { print "$word not in cmudict"; } print 'Arpabet: symbol table'; print "\n" Sites$ ./cmudict.cgi tomato XS.c: loadable library and perl binaries are mismatched (got handshake key 0x10000080, needed 0xfb80080) Sites$ sudo cpan Lingua::EN::CMUDict Password: Loading internal logger. Log::Log4perl recommended for better logging Reading '/Users/sandiway/.cpan/Metadata' Database was generated on Thu, 29 Oct 2026 00:54:04 GMT Lingua::EN::CMUDict is up to date (0.07). Sites$ ./cmudict.cgi tomato XS.c: loadable library and perl binaries are mismatched (got handshake key 0x10000080, needed 0xfb80080) Sites$ ls test.cgi test.cgi Sites$ more test.cgi #!/bin/bash echo "Content-Type: text/plain" echo echo "Running Bash script from ~/Sites successfully!" echo -n "Now it's: " date echo -n "User: " whoami echo -n "Directory: " ls -l exit 0 Sites$