I want to be able to search for text input by a user that will only search for jpg/jpegs. So far i am only able to get it to list jpg/jpegs files and not what has been input.
Thanks.
#!/usr/bin/perl print "Please enter text for search? \n"; $search=<STDIN>; chop $search; opendir(DIR, "."); @files = grep (/\.jpg|\.jpeg|\.JPEG|\.JPG/, readdir(DIR)); closedir(DIR); foreach $file (@files) { print "$file\n";
In reply to Search for text from user input by Nathan_84
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |