freelanceprogrammers.org Forum Index » Perl
Hi
Joined: 27 Jan 2004
Posts: 1
Hi
1.How can I print the resoult of this query "select count(*) from
table"......?????
2.If I have to many records in database and I want to split them on more
pages...how can I do that?
3.How can I show the the total rows that was inserted?
4. HOw can I export the database to a file?
Joined: 06 Jun 2006
Posts: 5
Hi
Hi all,
whenever im using....... (to get the no. of
occurences of the word "the" )
@words = split(/the/, $line);
$thecount += @words - 1;
im getting error as........
Split loop at countthe line 14, <STDIN> line
1
when i remove the in the pattern i.e.,
@words = split(/the/, $line) ;
then the code is executing .....
plz help me .........
Thanks & Regards
From
Ramesh
Send instant messages to your online friends http://in.messenger.yahoo.com
Joined: 06 Jun 2006
Posts: 3
Hi
Hi Ramesh,
Can you send me entire code, so that I can test on my system.
Thanks & regards
Malyadri Beegala
On 6/6/06, ramesh babu <bhupal78999@...> wrote:
>
> Hi all,
> whenever im using....... (to get the no. of
> occurences of the word "the" )
>
> @words = split(/the/, $line);
> $thecount += @words - 1;
>
> im getting error as........
> Split loop at countthe line 14, <STDIN> line
> 1
>
> when i remove the in the pattern i.e.,
> @words = split(/the/, $line) ;
> then the code is executing .....
>
> plz help me .........
>
> Thanks & Regards
>
> From
> Ramesh
>
> Send instant messages to your online friends http://in.messenger.yahoo.com
>
>
>
--
Malyadri Beegala
Software Developer,
Larsen & Toubro Infotech Limited.
malyadri.beegala@...
IM: bmalyadri (AIM)
https://www.linkedin.com/in/malyadri
Chennai- 600 089
mobile: 919884770738
[Non-text portions of this message have been removed]
Joined: 03 Jul 2005
Posts: 15
Hi
ramesh babu wrote:
: whenever im using (to get the no. of
: occurences of the word "the" )
:
: @words = split(/the/, $line);
: $thecount += @words - 1;
Didn`t read the docs, huh? According to perlfaq4 this
is a good way to get that count.
my $count = () = $line =~ /the/ig;
Since it looks like you are in a loop, this might
work well.
use strict;
use warnings;
my $count = 0;
while ( my $line = <DATA> ) {
$count += () = $line =~ /the/ig;
}
print $count;
__END__
The quick brown fox jumped over the big huge
hedge dragging the yummy bowl of chili and all
the antacid.
HTH,
Charles K. Clarkson
--
Mobile Homes Specialist
Free Market Advocate
Web Programmer
254 968-8328
Don`t tread on my bandwidth. Trim your posts.
All times are GMT
Page 1 of 1
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Freelace Website Designer - Customer web design and software building.
Booking Calendar - reservation calendar script
Land Surveying - total station instruments and equipments
China Wholesale - Electronics Products
Character Studio - Tutorials and Help
Booking Calendar - reservation calendar script
Land Surveying - total station instruments and equipments
China Wholesale - Electronics Products
Character Studio - Tutorials and Help







