perl

--============== 34126482==
Content-Type: multipart/alternative;
boundary="----=_Part_24019_5560194.1199935858066"

------=_Part_24019_5560194.1199935858066
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

Hi
I have a small doubt regarding perl. Can please help me out...

Usually in perl to count the occurance of a specific variable in the input
we will use "count".
I want to know whether we can assign differnt variables and can be able to
count the total no of that variables in the input...

EXAMPLE:
m_sites = ' ggwxy ', ' ggvtew ', ' gyhtdj ' , ' hhhwqr ' .
i want to know what we can do to count the total no of m_sites in the
input



Thanks in advance
siri

------=_Part_24019_5560194.1199935858066
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline


Hi<br>

I have a small doubt regarding perl. Can please help me out...<br>

<br>

Usually in perl to count the occurance of a specific variable in the input<br>

we will use "count".<br>

 I want to know whether we can assign differnt variables and can be able to<br>

 count the total no of that variables in the input...<br>

<br>

 EXAMPLE:<br>

       m_sites  =  ' ggwxy ',  ' ggvtew ', '  gyhtdj ' , ' hhhwqr ' .<br>

 i want to know what we can do to count the total no of m_sites in the<br>

 input<br>

<br clear="all">
<br clear="all"><br>Thanks in advance<br>
siri<br>


------=_Part_24019_5560194.1199935858066--

--============== 34126482==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
ActivePerl mailing list
ActivePerl [at] listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
--============== 34126482==--
siri isha [ Do, 10 Januar 2008 04:30 ] [ ID #1904953 ]

Re: perl

siri isha wrote:
> Hi
> I have a small doubt regarding perl. Can please help me out...
>
> Usually in perl to count the occurance of a specific variable in the input
> we will use "count".
> I want to know whether we can assign differnt variables and can be able to
> count the total no of that variables in the input...
>
> EXAMPLE:
> m_sites = ' ggwxy ', ' ggvtew ', ' gyhtdj ' , ' hhhwqr ' .
> i want to know what we can do to count the total no of m_sites in the
> input

That's pretty cryptic. Is m_sites supposed to be a Perl vrbl (ie: $m_sites)
or maybe a config file line ?

If it's a Perl vrbl, you could do a split on /\s*,\s*/ and the array size
would be your count.

Better to post actual code than some strange looking example as above.
_______________________________________________
ActivePerl mailing list
ActivePerl [at] listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Bill Luebkert [ Do, 10 Januar 2008 04:46 ] [ ID #1904954 ]
Perl » gmane.comp.lang.perl.active-perl » perl

Vorheriges Thema: Regarding using MLDBM with Storable
Nächstes Thema: Install ActivePerl-5.8.8.820-MSWin32-x86-274739.msi under Windows XP