C
Chris L.
Dear All,
I am trying to match a specific pattern using grep.
my @results=grep(/$cominput/,@common);
print "@results";
Naturally,Grep is only printing the lines that variable '$cominput' is
found on. My dilemma is I want to print a pattern. Specifically, where
variable '$cominput' is found all the way until the character '<' is
found. Example,
<$cominput 7894596 isnlpop 78304 plmeitn 4457624 knmljebn
93643456346500 lfnsndh 235 hfgnsdljjtngf 7753 fhs 8694039486 jfsndfkgs
jsdhfnskdk 753299658 hgnsnd 2573275 nvndjgfi 847523
<
I would like to grep from "$cominput" to the character "<".
I have looked into the map function and several pattern matching
examples from google searches, ie:
while (<>) {
if (/BEGIN PATTERN/ .. /END PATTERN/) {
}
}
But nothing seems to be working. is there a better way to accomplish
this??
Thank you very much for your time.
Chris
I am trying to match a specific pattern using grep.
my @results=grep(/$cominput/,@common);
print "@results";
Naturally,Grep is only printing the lines that variable '$cominput' is
found on. My dilemma is I want to print a pattern. Specifically, where
variable '$cominput' is found all the way until the character '<' is
found. Example,
<$cominput 7894596 isnlpop 78304 plmeitn 4457624 knmljebn
93643456346500 lfnsndh 235 hfgnsdljjtngf 7753 fhs 8694039486 jfsndfkgs
jsdhfnskdk 753299658 hgnsnd 2573275 nvndjgfi 847523
<
I would like to grep from "$cominput" to the character "<".
I have looked into the map function and several pattern matching
examples from google searches, ie:
while (<>) {
if (/BEGIN PATTERN/ .. /END PATTERN/) {
}
}
But nothing seems to be working. is there a better way to accomplish
this??
Thank you very much for your time.
Chris