Re: Efficient way of comparing items in an array

2008-10-29 Thread Dave Tang
On Thu, 30 Oct 2008 16:04:31 +1000, Dave Tang <[EMAIL PROTECTED]> wrote: Hi everybody, I am working with a sorted array (sorted from smallest to largest), containing coordinates as such: 13645692 13645693 13645694 13645695 13645696 13645697 13645698 13645699 13645700 13645701 13645702 13645

Efficient way of comparing items in an array

2008-10-29 Thread Dave Tang
Hi everybody, I am working with a sorted array (sorted from smallest to largest), containing coordinates as such: 13645692 13645693 13645694 13645695 13645696 13645697 13645698 13645699 13645700 13645701 13645702 13645703 13645704 13645705 13645706 13645707 13645708 13645709 13645710 13645711

Re: Curly braces and the logic of PERL

2008-10-29 Thread Chas. Owens
On Thu, Oct 30, 2008 at 00:40, Mr. Shawn H. Corey <[EMAIL PROTECTED]> wrote: > On Thu, 2008-10-30 at 04:05 +, Rob Dixon wrote: >> Mr. Shawn H. Corey wrote: >> > >> > I don't have any serious objections to the way this list is run. I do >> > object >> > to some actions individuals have taken.

Re: Curly braces and the logic of PERL

2008-10-29 Thread Mr. Shawn H. Corey
On Thu, 2008-10-30 at 04:05 +, Rob Dixon wrote: > Mr. Shawn H. Corey wrote: > > > > I don't have any serious objections to the way this list is run. I do > > object > > to some actions individuals have taken. Such as lying. If no such poll > > exists, don't claim that is does. > > I am re

Re: Curly braces and the logic of PERL

2008-10-29 Thread Rob Dixon
Mr. Shawn H. Corey wrote: > > I don't have any serious objections to the way this list is run. I do object > to some actions individuals have taken. Such as lying. If no such poll > exists, don't claim that is does. I am responding to this only because you have chosen to call me a liar. I am n

Re: Strip HTML from files in a directory

2008-10-29 Thread Rob Dixon
bdy wrote: > > Does anyone know if there's a way to use an HTML stripper in Perl to > scrub the HTML from all files in a specified directory? If so, would > you point me in the correct direction. I would recommend something like use HTML::TreeBuilder; my $tree = HTML::TreeBuilder->new_from_c

Re: Curly braces and the logic of PERL

2008-10-29 Thread Mr. Shawn H. Corey
On Wed, 2008-10-29 at 23:41 +, Rob Dixon wrote: > Mr. Shawn H. Corey wrote: > > On Wed, 2008-10-29 at 01:20 +, Rob Dixon wrote: > >> > >> bottom-posting being a de-facto standard on this list, and despite > a > >> majority of subscribers expecting it and preferring it > > > > Really? When

Re: Curly braces and the logic of PERL

2008-10-29 Thread Rob Dixon
Jack Gates wrote: > > Rob, My comments were not directed to you. > > My comment was directed at Jenda because Jenda's comments came > across as flat not giving a da?? about people with phyiscal > challenges and that is what I was attacking. Your comments were directed to everyone on the perl.b

Re: Curly braces and the logic of PERL

2008-10-29 Thread Rob Dixon
Mr. Shawn H. Corey wrote: > On Wed, 2008-10-29 at 01:20 +, Rob Dixon wrote: >> >> bottom-posting being a de-facto standard on this list, and despite a >> majority of subscribers expecting it and preferring it > > Really? When was the last poll conducted and where were its results > published?

Re: Tracking which elements from an array have been matched.

2008-10-29 Thread Jenda Krynicky
From: "Mr. Shawn H. Corey" <[EMAIL PROTECTED]> > On Wed, 2008-10-29 at 16:29 +, Taylor, Andrew (ASPIRE) wrote: > > However, I also need to keep a track of which records in the array > > have > > been 'found' (so I can later identify any records that haven't). > > > > @contains_id = grep {/$re

RE: Tracking which elements from an array have been matched.

2008-10-29 Thread Taylor, Andrew (ASPIRE)
>On Wed, 2008-10-29 at 16:29 +, Taylor, Andrew (ASPIRE) wrote: >> I have an array of records. I need to search this array for a >> particular record (or records) based on a record id. >> >> This is simple enough (e.g. using the grep function) >> >> @found = grep {/$rec_id/} @array; >> >>

Re: Tracking which elements from an array have been matched.

2008-10-29 Thread Mr. Shawn H. Corey
On Wed, 2008-10-29 at 16:29 +, Taylor, Andrew (ASPIRE) wrote: > I have an array of records. I need to search this array for a > particular record (or records) based on a record id. > > This is simple enough (e.g. using the grep function) > > @found = grep {/$rec_id/} @array; > > However,

Tracking which elements from an array have been matched.

2008-10-29 Thread Taylor, Andrew (ASPIRE)
Hello I have an array of records. I need to search this array for a particular record (or records) based on a record id. This is simple enough (e.g. using the grep function) @found = grep {/$rec_id/} @array; However, I also need to keep a track of which records in the array have be

RE: Strip HTML from files in a directory

2008-10-29 Thread Stewart Anderson
> -Original Message- > From: bdy [mailto:[EMAIL PROTECTED] > Sent: 29 October 2008 15:14 > To: beginners@perl.org > Subject: Strip HTML from files in a directory > > Does anyone know if there's a way to use an HTML stripper in Perl to > scrub the HTML from all files in a specified director

Strip HTML from files in a directory

2008-10-29 Thread bdy
Does anyone know if there's a way to use an HTML stripper in Perl to scrub the HTML from all files in a specified directory? If so, would you point me in the correct direction. Thanks, -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.p

progress bar

2008-10-29 Thread protoplasm
I want to implement a status/progress bar in my little piece of find file code. I've looked at Term::ProgressBar and Smart::Comments and I've tried many many different examples. But I cannot figure out how to implement either of the two into my code. Any pointers/tips/ideas would be appreciated. H

Re: Reading Files - Which approach is best

2008-10-29 Thread Jenda Krynicky
From: AndrewMcHorney <[EMAIL PROTECTED]> > I am continuing work on my script. I know there are many ways to read > files. I am going to be opening files that are text and also that are binary. > > Here are my 2 ways that I have done it it in the past. I am wondering > which way is best. > > $_

Re: Can't download and install Spreadsheet::WriteExcel module on WindowsXP

2008-10-29 Thread sisyphus
On Oct 29, 8:49 am, [EMAIL PROTECTED] (Tony Esposito) wrote: . .  > The CPAN.pm method to install the Spreadsheet::WriteExcel module just plainly > 'times out' from what I would guess is a firewall issue.  And when I download > the .tar.gz file for Spreadsheet::WriteExcel and try to unzip I get a

RE: Curly braces and the logic of PERL

2008-10-29 Thread Richard.Copits
I'm mainly a lurker on this list as I'm still learning Perl, but like Octavian, I'm legally blind. I've been in both camps - fully sighted and legally blind - so I have some perspective. I think both sides have defensible points. However, what if the person who needed the accommodation were your

RE: Doubt in Spreadsheet::ParseExcel

2008-10-29 Thread Stewart Anderson
_ From: anitha victor [mailto:[EMAIL PROTECTED] Sent: 29 October 2008 08:54 To: beginners@perl.org Subject: Doubt in Spreadsheet::ParseExcel Hi Team, I want a code snippet for retrieving the content in xcel sheet in a variable. Thanks in advance The CPAN documentation for thi

RE: Installing perl modules

2008-10-29 Thread Stewart Anderson
> Hi Andy, > > > Andy Cravens wrote: > > Is there a way to have multiple users on a server using the perl at > > /usr/local/bin/perl and yet have their own personal perl modules that > > the other users can't see? > > > ... > > During module install you can specify an alternate location to instal

Re: Reading a list of numbers from a file into a array

2008-10-29 Thread Adam Jimerson
Thanks for the help. "John W. Krahn" wrote: > vendion wrote: >> Hello I am having trouble finding the correct syntax for reading a >> list of numbers from a file, it is open and can read from it, I tried >> with >> while () { >> chomp; >> @some_array = $_; >> print "@some_array\n"; >> } > > my @

Re: Curly braces and the logic of PERL

2008-10-29 Thread Jack Gates
On Tuesday 28 October 2008 10:06:44 am Jenda Krynicky wrote: > > We can't care about ALL those who read it. The best we can do is > to care about MOST. I know it's inconvenient if you are not part > of the majority, but there is little we can do. > That is a cold, callous, self serving statement.

Re: Curly braces and the logic of PERL

2008-10-29 Thread Jenda Krynicky
From: Jack Gates <[EMAIL PROTECTED]> > On Tuesday 28 October 2008 09:20:30 pm Rob Dixon wrote: > > Jack Gates wrote: > > > On Tuesday 28 October 2008 10:06:44 am Jenda Krynicky wrote: > > >> We can't care about ALL those who read it. The best we can do > > >> is to care about MOST. I know it's inco

Re: Curly braces and the logic of PERL

2008-10-29 Thread Jenda Krynicky
From: Rob Dixon <[EMAIL PROTECTED]> > I have a particular issue with statements like > > /\Q$string/ && print $REPORT "$File::Find::name\n" and return; > > which are ugly in the extreme and do not begin to read as English. The style > comes from Perl's origins on the Unix platform, and use of s

dbdimp.c:1: error:

2008-10-29 Thread Brent Clark
Dear all We have a 64bit machine running SLES10 on which I would like to install Bugzilla, I downloaded it and ran the ./checksetup.pl –check-modules script. I then ran 'perl –MCPAN –eshell' and did a install Bundle::Bugzilla It then did the lot of install and questions which I cannot remember.

LWP::Useragent htaccess does not work

2008-10-29 Thread OXx
Hello all, I try to make a script to download a file with htaccess. I have the error 401, it does not work. Why my script do not use my credentials? #!/usr/bin/perl use LWP::UserAgent; my $ua = LWP::UserAgent->new; $ua->credentials( '192.168.0.200:443', 'weba', 'myuser' => 'mypass'

Doubt in Spreadsheet::ParseExcel

2008-10-29 Thread anitha victor
Hi Team, I want a code snippet for retrieving the content in xcel sheet in a variable. Thanks in advance[?] --- Anitha victor <<328.png>>

Re: Installing perl modules

2008-10-29 Thread Raymond Wan
Hi Andy, Andy Cravens wrote: Is there a way to have multiple users on a server using the perl at /usr/local/bin/perl and yet have their own personal perl modules that the other users can't see? ... During module install you can specify an alternate location to install the module using LIB