I have been trying to search a pattern called "Group name" starts with X(ex: XCT08L1) under List Name.
Please find the code snippet.
#!/usr/local/bin/perl my $str = ""; open (FD, "<", "PatternSearch.txt"); my @lines = <FD>; close FD; foreach (@lines) { if(/LIST NAME:\t[A-Z]../) { print STDOUT $_; $str= $str.$_; open (NW, ">", "RES.txt"); print NW $str; close NW; } }
The above code is fetching Group Name in SearchPattern.txt.
I need to get List Name, Group Name (starts with X )and its Trasactions into another file.
The attachment shows "List name", "Group Name" and "Transactions" detail.
Attached File(s)
-
PatternSearch.txt (5.29K)
Number of downloads: 217