Re: Sort + Use of uninitialized value

2007-04-24 Thread Owen Cook
On Wed, Apr 25, 2007 at 01:37:24AM -0400, yitzle wrote: > Warning message: > Use of uninitialized value in numeric comparison (<=>) at ... > > Code: > foreach (sort { $dHash{$b}{'VAL} <=> $dHash{$a}{'VAL'} } keys %dHash) { perhaps foreach (sort { $dHash{$b}{'VAL'} <=> $dHash{$a

Re: module installation problem

2007-04-24 Thread I . B .
I will try to reproduce this again. I am sure it was Net::FTP::Recursive thank you for response ~igy On 4/24/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: Hi, I think that you have a little mistake Run perl -MNet::FTP::Recursive -e "1;" instead of perl -MNet::Ftp::Recursive -e "1;". Yo

Sort + Use of uninitialized value

2007-04-24 Thread yitzle
Warning message: Use of uninitialized value in numeric comparison (<=>) at ... Code: foreach (sort { $dHash{$b}{'VAL} <=> $dHash{$a}{'VAL'} } keys %dHash) { How do I fix? Should my sort function be checking for variable defined? What do I return on undefined? -- To unsubscribe, e-mail: [EMAIL P

Re: module installation problem

2007-04-24 Thread yaron
Hi, I think that you have a little mistake Run perl -MNet::FTP::Recursive -e "1;" instead of perl -MNet::Ftp::Recursive -e "1;". Yours, Yaron Kahanovitch - Original Message - From: "I.B." <[EMAIL PROTECTED]> To: beginners@perl.org Sent: Wednesday, April 25, 2007 7:27:18 AM (GMT+0200) Au

Re: module installation problem

2007-04-24 Thread Chas Owens
On 4/25/07, I. B. <[EMAIL PROTECTED]> wrote: snip # it exists $ ls /usr/local/share/perl/5.8.7/Net/FTP/Recursive.pm /usr/local/share/perl/5.8.7/Net/FTP/Recursive.pm snip Does anyone know if this is some kind of cache I am not aware about? thank you in advance. snip Make sure the file is readabl

module installation problem

2007-04-24 Thread I . B .
Hi people, I installed module Net::Ftp::Recursive. All following steps succeeded: perl Makefile.PL make make test make install # next i tested if module loading correctly ~$ perl -MNet::Ftp::Recursive -e "1;" Can't locate Net/Ftp/Recursive.pm in @INC (@INC contains: /etc/perl /usr/local/lib/perl

Re: Math::BigFloat

2007-04-24 Thread Tom Phoenix
On 4/24/07, Somu <[EMAIL PROTECTED]> wrote: I'm unable to compare numbers using the module. Actually i can only use it to create numbers like 0 or inf or 1 or their negatives. But i dont know how to use their methods. Bcoz the examples in the doc aren't working. Can i get some simple examples?

Math::BigFloat

2007-04-24 Thread Somu
I'm unable to compare numbers using the module. Actually i can only use it to create numbers like 0 or inf or 1 or their negatives. But i dont know how to use their methods. Bcoz the examples in the doc aren't working. Can i get some simple examples? -- To unsubscribe, e-mail: [EMAIL PROTECTED] F

Re: Perl error

2007-04-24 Thread John W. Krahn
Kevin Viel wrote: > I obtained the following message: > Can't locate warnings.pm in @INC (@INC contains: > /usr/perl5/5.00503/i86pc-solaris /usr/perl5/5.00503 ^^^ > /usr/perl5/site_perl/5.005/i86pc-solaris /usr/perl5/site_perl/5.005 .) ^ >> /usr/perl5/5.

Re: Perl error

2007-04-24 Thread Kevin Viel
I obtained the following message: Can't locate warnings.pm in @INC (@INC contains: /usr/perl5/5.00503/i86pc-solaris /usr/perl5/5.00503 /usr/perl5/site_perl/5.005/i86pc-solaris /usr/perl5/site_perl/5.005 .) /usr/perl5/5.6.1/lib/warnings.pm f none 0444 root bin 14333 49307 1106351821 SUNWpl5u /u

Params::Util installation probelm

2007-04-24 Thread jimmy yu
hello! i'm trying to install rt on a brand new install of ubuntu 6.06. i can't seem to get past the perl module installations, which scares me. i wonder if i'm getting in over my head anyways, i'm having trouble installing Test::Inline which always chokes on Params::Util. this is part of

Re: iso-8859-1 to unicode problem

2007-04-24 Thread Beau E. Cox
On Tuesday 24 April 2007 02:07, Mumia W. wrote: > On 04/24/2007 03:06 AM, Jeff Pang wrote: > > 2007/4/24, Beau E. Cox <[EMAIL PROTECTED]>: > >> How do I get a proper conversion from iso-8859-1 to perl's internal > >> utf8? [snipped] > I don't think it'll work in this case because \x99 doesn't seem

Test of scripts with Test::More

2007-04-24 Thread yaron
Hi, Recently i wrote a perl module that includes package and a script. As part of the module sanity tests, I would like to run the script and verify a success. For that, I am using Test::More and Test::Simple. Is there any recommendations how to do this? Thanks, Yaron Kahanovitch -- To unsub

Re: How to sum up values

2007-04-24 Thread Rob Dixon
Andrej Kastrin wrote: Dear all, Question about the sum function; the file structure is as follows: A|100 A|200 A|150 B|20 B|90 C|10 C|30 C|300 The result I want to obtain is to sum values in the second column (columnB) for each particular letter in the first column (ColumnA); e.g.: A|450 B|

Re: How to sum up values

2007-04-24 Thread Shiping Wang
Hi, At 05:33 AM 4/24/2007, Andrej Kastrin wrote: Dear all, Question about the sum function; the file structure is as follows: A|100 A|200 A|150 B|20 B|90 C|10 C|30 C|300 The result I want to obtain is to sum values in the second column (columnB) for each particular letter in the first column

Re: How to sum up values

2007-04-24 Thread Peter Scott
On Tue, 24 Apr 2007 13:33:32 +0200, Andrej Kastrin wrote: > Question about the sum function; the file structure is as follows: > > A|100 > A|200 > A|150 > B|20 > B|90 > C|10 > C|30 > C|300 > > The result I want to obtain is to sum values in the second column > (columnB) for each particular lett

Re: iso-8859-1 to unicode problem

2007-04-24 Thread Mumia W.
On 04/24/2007 03:06 AM, Jeff Pang wrote: 2007/4/24, Beau E. Cox <[EMAIL PROTECTED]>: How do I get a proper conversion from iso-8859-1 to perl's internal utf8? Hello, You may use Encode module's decode function to do this conversion. ie,for this string which was 'gb2312' format, $str = "中文";

RE: How to sum up values

2007-04-24 Thread Andrew Curry
Something as crude as use Data::Dumper; open( FILE, '< file' ) || die $!; my ( $line, $ela, $elb, $pre, %count, $i, $tot); $tot = 0; while ( $line = ) { $i++; ( $ela, $elb ) = split ( '\|', $line ); # # remove any white space # $elb=~s/\s+

How to sum up values

2007-04-24 Thread Andrej Kastrin
Dear all, Question about the sum function; the file structure is as follows: A|100 A|200 A|150 B|20 B|90 C|10 C|30 C|300 The result I want to obtain is to sum values in the second column (columnB) for each particular letter in the first column (ColumnA); e.g.: A|450 B|100 C|330 I don't want

Re: iso-8859-1 to unicode problem

2007-04-24 Thread Jeff Pang
2007/4/24, Beau E. Cox <[EMAIL PROTECTED]>: How do I get a proper conversion from iso-8859-1 to perl's internal utf8? Hello, You may use Encode module's decode function to do this conversion. ie,for this string which was 'gb2312' format, $str = "中文"; We use decode to convert it to perl's in

iso-8859-1 to unicode problem

2007-04-24 Thread Beau E. Cox
Hi - I am new to international character encoding and how the various encodings are handled in perl. After a day of reading, I'm asking for help. I am downloading data from an international (French) web site. The HTTP headers show that the pages I am downloading are encoded in iso-8859-1. Most ch