Re: Reading and matching email ids

2007-04-20 Thread Boga Srinivas
Hi kumar, Try this. [EMAIL PROTECTED]:~/perl$ cat reg.pl #! /usr/bin/perl $id="[EMAIL PROTECTED]"; while(<>) { chomp($_);print "$_\t"; print "$id found\n" if /$id/; print "$id not found\n" if ! /$id/; } [EMAIL PROTECTED]:~/perl$ cat mail.txt [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED

Re: Perl: how these two variables are equal numerically?

2007-04-10 Thread Boga Srinivas
Hi Hoffman, When you are trying to do a numeric comparsion on strings. The interpreter will try to convert them to numbers and then do a comparsion. if it cannot convert to numbers they are made 0's and then it will compare. for more info please refer to this url: http://www.perlmeme.org/ho

Re: scalar %hash

2007-03-30 Thread Boga Srinivas
Hi, This is the number of buckets in use and the total number of buckets in the hash. For more info please refer to the following url: http://www.perlmonks.org/?node_id=173677 -srini jonatan perry wrote: Hi you all :-) my name is Jonatan, I am new it this lists. I was wondering, why do p

Re: sending output to file and terminal

2007-03-29 Thread Boga Srinivas
00:00:00 perl -srini lakshmi priya wrote: Hi, Thanks for your prompt reply, I have no idea how to use perl modules. Could you please help. I tried using use IO::Tee; use IO::Handle; but i got an error saying Can't locate IO/Tee.pm in @INC () please help On 3/29/07, *Boga

Re: sending output to file and terminal

2007-03-28 Thread Boga Srinivas
Hi lakshmi, I think we can use the "Tee" module for that. http://search.cpan.org/~dagolden/Tee-0.13/lib/Tee.pod -srini lakshmi priya wrote: Hi all, I have written a perl script that prints the output to the terminal. I also want to write the output to a file. So, what I have done is w

help with the regular expression

2007-03-21 Thread Boga Srinivas
Hi, I am trying to capture the data between 2 patterns. The following is the code snippet. $str="hello: 0 fj gerkjiuiojijgre kgoerkgop hello: 1"; $str =~ /hello:\s0(.*)hello:\s1/; $title = $1; print $title; But this does not work. Can any one help me ~Regards Srini -- To unsubs