The great advantage of these arrays is that they are expandable. They are essencially the same as hash tables. I'm not sure what determines the order. The second line then opens this file - INFO is the file handle that Perl uses to refer to the file from here on. The file is then closed, and the array is printed out.
Most loops require a test to see whether a value is true to determine when to quit a loop.
These are the structures needed for that in Perl. Note that the input will include a newline character which will distort what the user meant, so we remove it with chop . This is different because the condition comes at the end, so the loop always executes once. Remember not to put the e in elsif , and don't ask me why not. String Matching String manipulation was originally at the heart of Perl, and it is still one of its most useful features.