in reply to Re: grep & timesearch
in thread grep & timesearch
($min, $max, $key) = split /-/, $range;
if (($2 ge $min) && ($2 le $max) && ($3 eq $key)) {
push(@{$mylist{$2}}, $_);
}
I ALSO TRIED THE NEXT CODE
($min, $max, $key) = split /-/, $range;
if (($2 ge $min) && ($2 le $max) && /$key/) {
push(@{$mylist{$2}}, $_);
}
I ALSO TRIED THIS CODE BELOW TOO
$range = <STDIN>;
$key = <STDIN>;
($min, $max) = split /-/, $range;
if (($2 ge $min) && ($2 le $max) && grep /$key/, $_) {
push(@{$mylist{$2}}, $_);
}
Excuse my dumbness but I can't figure it out.
|
|---|