Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
#!/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.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: How to do pattern matching and output the results?
by repson (Chaplain) on Nov 23, 2000 at 09:31 UTC |