in reply to Re: Trying to make a search
in thread Trying to make a search
Of course, I kind of like something like#!/usr/bin/perl -w use strict; print "Letter? "; chomp(my $letter = <STDIN>); open DATA, "books.txt" or die "open(books.txt) returned: $!\n"; print grep {/^$letter/io} <DATA>;
Try it, you'll like it too!perl -e 'print grep {/^a/io} <>' /usr/dict/words
|
|---|