#!/usr/local/bin/perl $file = 'thesaurus'; # Name the file open(INFO, $file); # Open the file @lines = $a; # Read it into an array print " What are you looking for? "; # Ask for input $a = <STDIN>; # Get input chop $a; # Remove the newline at + end print "@lines\n";
Originally posted as a Categorized Question.
In reply to How to do pattern matching and output the results? by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |