On Mon, 20 Aug 2012 13:39:16 -0700 (PDT)
Rajeev Prasad <[email protected]> wrote:
> my $count=0;
> seek $tmp_FH,0,0;
> while (<$tmp_FH>)
> {
> my $line=$_;chomp($line);
# Please put each statement on its own line
> if ($line=~m/\"$str\"/) {$count++;} #in the
> file $str string would be in quotes.... }
# or
$count ++ if $line =~ m/\"$str\"/;
--
Just my 0.00000002 million dollars worth,
Shawn
Programming is as much about organization and communication
as it is about coding.
_Perl links_
official site : http://www.perl.org/
beginners' help : http://learn.perl.org/faq/beginners.html
advance help : http://perlmonks.org/
documentation : http://perldoc.perl.org/
news : http://perlsphere.net/
repository : http://www.cpan.org/
blog : http://blogs.perl.org/
regional groups : http://www.pm.org/
--
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
http://learn.perl.org/