Hi changalrai......i hope my following code will help you. Suppose that your data is in SOPW.txt file .The the following code will retrieve what you wanted.
#! /usr/bin/perl use strict; use warnings; open (my $fh, "<", "c:/SOPW.txt") or die "can't open the file :$!"; while (<$fh>){ chomp; if(m/\w+:(.*);/){ print "$1\n"; } }
In reply to Re: pattern matching
by changma_ha
in thread pattern matching
by changalrai
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |