CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Regular Expressions: Re: [KevinR] pattern mathc in .jar file: Edit Log



sandeepsirsgi
Novice

Jan 22, 2007, 9:43 PM


Views: 8800
Re: [KevinR] pattern mathc in .jar file

This is the code i had .

#!/usr/bin/perl
use strict;
use warnings;
open (FILE3,"A") || die "can't open the file filename : $!\n";
open (FILE4,"B") || die "can't open the file : $!\n";
open (FILE5,">>list") || die "can't create file list : $! \n";
while(<FILE3>)
{
chomp;
print("$_ content of file list \n");
chomp;
while(my $test1 = <FILE4>)
{
chomp;
print "$test1 \n";
if($test1 =~m /$_/)
{
print "Matched line is $test1 \n ";
}

}
}


close(FILE4);
close(FILE3);
close(FILE5);


This code is printing only the first matched line from file A and B, not all. At present i have only this much of code. Any sugesstion to implement the whole requirement are welcome.


(This post was edited by sandeepsirsgi on Jan 22, 2007, 9:43 PM)


Edit Log:
Post edited by sandeepsirsgi (Novice) on Jan 22, 2007, 9:43 PM


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives