Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re: pattern matching

by changma_ha (Sexton)
on Sep 22, 2010 at 09:29 UTC ( #861236=note: print w/replies, xml ) Need Help??


in reply to pattern matching

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"; } }

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://861236]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (2)
As of 2022-09-25 15:35 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I prefer my indexes to start at:




    Results (116 votes). Check out past polls.

    Notices?