Create the smallest script that runs without errors in Perl and Python.
For Perl, a script needs to evaluate to a true value, which can be represented simply as 1;. In Python, we can write a script with only a pass statement or leave it entirely empty.
Create a script to implement full-text search functionality using an Inverted Index. An inverted index maps words to the documents they appear in to allow fast searches.
For the Perl solution, we read through files, split their content into words, clean them up, and build a nested hash where the keys are the lowercase words, and the values are hashes mapping document filenames to 1. For the Python solution, we use an SQLite database to store words, documents, and a join table found representing the mappings.