italiansauce88 has asked for the wisdom of the Perl Monks concerning the following question:
Where $input is the <STDIN>, how can I make this grep search case insensitive?my @bintext2 = grep {$_ =~ "$input"} @bintext;
Thank You!!!#!usr/bin/perl -w # nl.plx use strict; open FILE,"<$ARGV[0]"; my @foo = <FILE>; my $lineno = 1; print "Enter in search keyword: "; my $input = <STDIN>; chomp($input); my @bintext = qx(strings.exe -n 4 Page.txt); print "@bintext\n"; my @bintext2 = grep {$_ =~ "$input"} @bintext; print "@bintext2\n";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: GREP case insensitivity
by ccn (Vicar) on Nov 13, 2008 at 20:36 UTC | |
|
Re: GREP case insensitivity
by Corion (Patriarch) on Nov 13, 2008 at 20:37 UTC | |
|
Re: GREP case insensitivity
by duelafn (Parson) on Nov 13, 2008 at 23:59 UTC | |
by graff (Chancellor) on Nov 14, 2008 at 00:10 UTC | |
|
Re: GREP case insensitivity
by graff (Chancellor) on Nov 14, 2008 at 00:04 UTC | |
by jwkrahn (Abbot) on Nov 14, 2008 at 01:59 UTC | |
|
Re: GREP case insensitivity
by Hue-Bond (Priest) on Nov 14, 2008 at 08:21 UTC | |
by italiansauce88 (Initiate) on Nov 14, 2008 at 14:49 UTC |