Re: "1;"?

2003-01-24 Thread Rob Dixon
R. Joseph Newton wrote: > Rob Richardson wrote: > >> Greetings! >> >> Dan Muey's stumpy.lib file, quoted below, ends with a statement >> consisting of a single contstant value: "1;". This is the second >> time >> I've seen this today. What is its purpose? > > It's pretty much a standard for modul

Re: Using HTML::Parser question

2003-01-24 Thread Rob Dixon
Dan Muey wrote: > For clarity sake with all of the code and changes and stuff here is > the code that works mostly the way I want A virtue that - faith, hope and clarity. Sorry, /R -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: How do I test a variable to see if it is a scalar or a hash?

2003-01-24 Thread Christopher D . Lewis
On Thursday, January 23, 2003, at 11:43 AM, Ken Lehman wrote: How do I test a variable to see what type of variable it is(scalar, array, hash, etc...)? What I am trying to accomplish is I have a hash and some values are scalar data and some values are nested hashes and I need a way to tell th

improvements to code

2003-01-24 Thread Pam Derks
Hi all, I want to grap the: last first middle(if any) email from a text file sometimes there is a middle intital, sometimes there isn't sample data: Smith, Mary [EMAIL PROTECTED] Jones, Tommy Lee [EMAIL PROTECTED] can someone suggest improvements to the code below? #!/usr/bin/perl -w my ($fir

RE: For loop aliasing AND changing an array within a loop.

2003-01-24 Thread Michael Hooten
While stepping through the code I wrote, I distinctly noted that the substitution on $_ did NOT affect the array and vice versa. If anyone insists on adding or deleting elements of an array from within a loop, you can ... you just have to update either $_ or what $_ is aliased to, like the original

RE: Probably a simple hash question

2003-01-24 Thread Michael Hooten
> Here's the setup: > I have set up a hash %categories where the key is one number and the value > is another > i.e. $categories('1094') = 100049-0220-14 I assume you meant (note braces and quotes): $categories{1094} = '100049-0220-14' otherwise the value will be 100049-0220-14 = -

[ANN] splits2d.pl

2003-01-24 Thread David Eason
Uh-oh. Newbie code ahead. You have been warned. Thank you all for helping me with my questions! splits2d.pl can be used to split one or more HTML files of links, or bookmarks, into a set of HTML files of links, or bookmarks, by category. As currently written, splits2d prefers two types of HTML a

Re: Multiple use of same module question

2003-01-24 Thread Paul Johnson
R. Joseph Newton said: >> And that finally explains why in some of my scripts using the >> Win32::Lanman >> module I have to do a 'require Win32;' instead of a 'use Win32' if I >> don't >> want to get warning messages about conflicting constants. > > I*t sems to me that this is sort of a shortcom

SGI::FAM Module gives errors

2003-01-24 Thread Bernd Hinrichsen
Hi I receive the following error when runnung the 'monitor' perl script after installing SGI::FAM via CPAN. (I have installed it manually as well -> same error). 'Your vendor has not defined SGI::FAM macro new at ./monitor line 6' The script snippet is pasted below: #!/usr/bin/perl use SGI::FAM

RE: How to use com components in perl

2003-01-24 Thread Beau E. Cox
Hi - > -Original Message- > From: Pankaj Kapare [mailto:[EMAIL PROTECTED]] > Sent: Thursday, January 23, 2003 1:15 AM > To: [EMAIL PROTECTED] > Subject: How to use com components in perl > > > Hi > Can anybody tell me how to use com components developed in c++ > in perl script.If provi

RE: one line perl

2003-01-24 Thread Aimal Pashtoonmal
Hi, I am trying to get the following one liner to work, but the figure from the subtraction is printed after column 6 and column 7 and 8 are discarded. What I am trying to do is create an extra column after column 6 for the subtraction and retain the last two columns: perl -F'\t' -lane 'pri

Re: improvements to code

2003-01-24 Thread George P.
On Thu, 23 Jan 2003, Pam Derks wrote: > Hi all, > > I want to grap the: > last first middle(if any) email > from a text file > > sometimes there is a middle intital, sometimes there isn't > > sample data: > Smith, Mary [EMAIL PROTECTED] > Jones, Tommy Lee [EMAIL PROTECTED] > > can someone sugges

MS Word question

2003-01-24 Thread Southworth, Harry
I'm running Perl on Cygwin on top of Windows 2000. I have a lot of ascii text files that someone has thoughfully saved as Microsoft Word documents. If I open them in a text editor, I can see the ascii text, but there is some junk at the top and bottom. Testing the files with -T tells me they're no

Pairs have minimum difference

2003-01-24 Thread Nengbing Tao
Hi, ALL, I thought there should be a solution/algorithm already to this problem and would like to check here first. The problem: To return all the pairs (one number from each array, one number can only be in one pair) that have the smallest sum of absolute differences from two arrays.

RE: Pairs have minimum difference

2003-01-24 Thread Beau E. Cox
Hi - I'll pass - this looks like HOMEWORK! Please put on your thinking cap and try it... > -Original Message- > From: Nengbing Tao [mailto:[EMAIL PROTECTED]] > Sent: Friday, January 24, 2003 3:00 AM > To: [EMAIL PROTECTED] > Subject: Pairs have minimum difference > > > Hi, ALL, > >

Re: improvements to code

2003-01-24 Thread John W. Krahn
Pam Derks wrote: > > Hi all, Hello, > I want to grap the: > last first middle(if any) email > from a text file > > sometimes there is a middle intital, sometimes there isn't > > sample data: > Smith, Mary [EMAIL PROTECTED] > Jones, Tommy Lee [EMAIL PROTECTED] > > can someone suggest improveme

Re: Multiple use of same module question

2003-01-24 Thread Jenda Krynicky
From: "Paul Johnson" <[EMAIL PROTECTED]> > R. Joseph Newton said: > > worry about that at all. In C/C++, one of the standards for writing > > any header file is to always surround the entirety with an inclusion > > guard to prevent the precompiler from redefining classes or > > redeclarating other

NewbieQuestion Deleting the first 5 lines of a file

2003-01-24 Thread jeff . thomas
Hello, I have over 1000 files that I need to delete the first five lines of text from. This needed to be done, like yesterday. I started writting an Applescript to do this but ran into a bug with Folder Actions and attached scripts that stopped my progress dead. Would someone please show me how th

Pairs have minimum difference

2003-01-24 Thread TAO, NENGBING [AG/1000]
Hi, ALL, I thought there should be a solution/algorithm already to this problem and would like to check here first. The problem: To return all the pairs (one number from each array, one number can only be in one pair) that have the smallest sum of absolute differences from two arrays.

Re: [ANN] splits2d.pl

2003-01-24 Thread John W. Krahn
David Eason wrote: > > [snip] > > Any feedback is welcome. > > [snip] > > splits2d.zip, which contains splits2d.pl and supporting files (including a > sample input file bookmarks.html to play with), can be found at this link if > anyone's interested: > URL:http://www.webneed.net/~heydave/work-i

RE: Pairs have minimum difference

2003-01-24 Thread Dan Muey
> > Hi, ALL, > > I thought there should be a solution/algorithm already > to this problem and would like to check here first. > > > The problem: To return all the pairs (one number from each > array, one number can only be in one pair) that have the > smallest sum of absolute differ

Re: Multiple use of same module question

2003-01-24 Thread Paul Johnson
Jenda Krynicky said: > From: "Paul Johnson" <[EMAIL PROTECTED]> >> It sounds like something is broken in the Win32 import sub (I have >> never used or looked at Win32.pm), or that there is some other >> problem, but import guards are not the solution. > > No there is nothing broken. The modules A

RE: NewbieQuestion Deleting the first 5 lines of a file

2003-01-24 Thread Kipp, James
> Hello, > > I have over 1000 files that I need to delete the first five > lines of text from. > This needed to be done, like yesterday. I started writting an > Applescript to do > this but ran into a bug with Folder Actions and attached > scripts that stopped my > progress dead. Would someon

Re: Multiple use of same module question

2003-01-24 Thread Jenda Krynicky
From: "Paul Johnson" <[EMAIL PROTECTED]> > As I recall, someone (Timothy Johnson?) said they got errors from > using Win32 more than once and resorted to requiring it to silence the > errors. I don't think we ever saw the error messages or the code. > This prompted me to write the first paragraph

RE: Using HTML::Parser question

2003-01-24 Thread Dan Muey
Perfect Thank you so much for the enlightenment! I will study that until I have it down pat! Thanks a million!!! Today you receive the genius award (Sorry Rob :P) Dan > > Dan Muey wrote: > > > > > print "body text: @body\n"; # this needs to keep the tags were they > > are** > > > > tha

Re: one line perl

2003-01-24 Thread John W. Krahn
Aimal Pashtoonmal wrote: > > Hi, Hello, > I am trying to get the following one liner to work, but the figure > from the subtraction is printed after column 6 and column 7 and 8 are > discarded. What I am trying to do is create an extra column > after column 6 for the subtraction and retain t

Re: NewbieQuestion Deleting the first 5 lines of a file

2003-01-24 Thread John W. Krahn
Jeff Thomas wrote: > > Hello, Hello, > I have over 1000 files that I need to delete the first five lines of text from. > This needed to be done, like yesterday. I started writting an Applescript to do > this but ran into a bug with Folder Actions and attached scripts that stopped my > progress d

RE: Tk with Perl

2003-01-24 Thread Peter_Farrar
>Trying it now from the Command Prompt.seems to be just 'sitting' >there. Hi Tony, If you're still having trouble getting the package, it could be a firewall issue. I have to download packages, then install from my local box because of corporate B()[[S][|~!. I believe this is the correc

Easiest way to disable the ENTER key on a from

2003-01-24 Thread Liebert, Sander
I would like to disable the RETURN key on my form so users cannot accidentally submit it before they are finished. I have if statements that check to see if all the fields have input, but many users will complain since they are used to hitting RETURN instead of TAB. The submit button will need to o

Re: MS Word question

2003-01-24 Thread Bill Akins
Hi Harry, You might want to check out catdoc @ http://www.ice.ru/~vitus/catdoc/. I use this with Ht://Dig (http://htdig.org) for indexing Word docs on one of our webservers. Also take a look at laola (http://user.cs.tu-berlin.de/~schwartz/pmh/index.html), particularly lhalw portions. HTH! B

RE: free web hosting with full CGI service?

2003-01-24 Thread Russ Foster
Can you clarify "full" CGI service? Can we assume that, since you ask on a Perl list you are looking for Perl capabilities? www.netfirms.com offers Perl CGI scripting for free and only puts a modest banner on the top (no popups or other annoying garbage). -r -Original Message- From: MJ [

RE: Easiest way to disable the ENTER key on a from

2003-01-24 Thread wiggins
On Fri, 24 Jan 2003 09:13:32 -0600, "Liebert, Sander" <[EMAIL PROTECTED]> wrote: > I would like to disable the RETURN key on my form so users cannot > accidentally submit it before they are finished. I have if statements that > check to see if all

Re: Multiple use of same module question

2003-01-24 Thread Paul Johnson
Jenda Krynicky said: > From: "Paul Johnson" <[EMAIL PROTECTED]> >> As I recall, someone (Timothy Johnson?) said they got errors from >> using Win32 more than once and resorted to requiring it to silence the >> errors. I don't think we ever saw the error messages or the code. >> This prompted me t

RE: NewbieQuestion Deleting the first 5 lines of a file

2003-01-24 Thread Bob Showalter
[EMAIL PROTECTED] wrote: > Hello, > > I have over 1000 files that I need to delete the first five lines of > text from. This needed to be done, like yesterday. I started writting > an Applescript to do this but ran into a bug with Folder Actions and > attached scripts that stopped my progress dead

RE: NewbieQuestion Deleting the first 5 lines of a file

2003-01-24 Thread jeff . thomas
All files will be in the same directory. The files are Postscript. They all have a proprietary header with comments above the %!PS line so they all fail to print. At 24/01/2003 14:48:47, "Kipp, James" <[EMAIL PROTECTED]> wrote: > > Hello, > > > > I have over 1000 files that I need to delete the fi

unicode problem (?)

2003-01-24 Thread Zemer Rick
Hello, I have program that reads in text from an excel spreadsheet (using the Spreadsheet-ParseExcel module) that works great until... one of the cells has text that contains a tilda. It then appears that the program goes ape-s**t and starts printing out unicode (or multi-byte characters). Can

IMAGES ANALYSIS PROBLEM

2003-01-24 Thread Dario Greco
hi to all, i have to perform a quantitavie analysis of confocal microscopy images. these images have black pixel for background and green or red pixel in foreground (cellular structures stained with specific antibody). the intensity of each pixel may be from 0 to 255 (8 bit images in pseudocolors

ANOTHER IMAGE ANALYSIS PROBLEM

2003-01-24 Thread Dario Greco
hi to all and thanks to your suggests for my last problem. i've another challenge: i must quantify the length of neurites and the branching of dendrites in fluorescence microscopy images of neurons stained with specific antibodies. have you any suggest for me? thanks very much

Hash of Hashes of Arrays?

2003-01-24 Thread Glenn Tremblay
Hey folks, Although I'm getting pretty good at using newsgroups and assorted perl references(including this one!)to find answers to my questions, I can't seem to solve this one. This is what I've got: I have a list of inspection stations in a data file which is comma-separated. It contains t

Re: For loop aliasing AND changing an array within a loop.

2003-01-24 Thread Rob Dixon
Hi Michael. Michael Hooten wrote: > While stepping through the code I wrote, I distinctly noted that the > substitution on $_ did NOT affect the array and vice versa. If you watch carefully what Perl is doing, it aliases correctly _until_ you choose to modify the array. After this the correct val

RE: NewbieQuestion Deleting the first 5 lines of a file

2003-01-24 Thread Bob Showalter
[EMAIL PROTECTED] wrote: > Subject: RE: NewbieQuestion Deleting the first 5 lines of a file > At 24/01/2003 15:29:27, Bob Showalter > <[EMAIL PROTECTED]> wrote: > > [EMAIL PROTECTED] wrote: > > > Hello, > > > > > > I have over 1000 files that I need to delete the first five lines > > > of text fro

Re: Hash of Hashes of Arrays?

2003-01-24 Thread Pete Emerson
I'd be tempted to use a hash of hash of hashes, storing it like this: $hash{$city}{$station}{add1}=$address1 $hash{$city}{$station}{add2}=$address2 $hash{$city}{$station}{state}=$state $hash{$city}{$station}{zip}=$zip $hash{$city}{$station}{phone}=$phone So my loop would look like this: foreach my

Re: Hash of Hashes of Arrays?

2003-01-24 Thread Peter_Farrar
>I have a list of inspection stations in a data file which is >comma-separated. It contains the following data, in order: >Station Name, Address 1, Address Line 2, City, State, Zip, Phone Number > >I need to group the lines (of address information) by city and get a count >of the number of statio

RE: NewbieQuestion Deleting the first 5 lines of a file

2003-01-24 Thread jeff . thomas
At 24/01/2003 15:29:27, Bob Showalter <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] wrote: > > Hello, > > > > I have over 1000 files that I need to delete the first five lines of > > text from. This needed to be done, like yesterday. I started writting > > an Applescript to do this but ran into a

Re: Hash of Hashes of Arrays?

2003-01-24 Thread Manideepa Bhowmik
Hello folks, I am having a problem of embedding the html tag http://www.cnn.com >Click here in a perl script. Could someone please help . Thanks. Deepa >>> <[EMAIL PROTECTED]> 01/24/03 01:01PM >>> >I have a list of inspection stations in a data file which is >comma-separated. It contains the fo

RE: NewbieQuestion Deleting the first 5 lines of a file

2003-01-24 Thread Kipp, James
> > > > > > perl -i.bak -ne 'print if $.>5; close ARGV if eof' *.txt > > Bob I have been trying to figure out a different solution then using the -i arg. Is there a simple way to just open each file, delete the 5 lines in place and close it(with no backup file), without getting into sysread, tru

Re: improvements to code

2003-01-24 Thread Rob Dixon
Hi Pam. Some peripheral comments, now that others have done all of the hard work :) John W. Krahn wrote: > Pam Derks wrote: >> I want to grap the: >> last first middle(if any) email >> from a text file >> >> sample data: >> Smith, Mary [EMAIL PROTECTED] >> Jones, Tommy Lee [EMAIL PROTECTED] >> >>

RE: Link in perl

2003-01-24 Thread Dan Muey
> > Hello folks, > I am having a problem of embedding the html tag > http://www.cnn.com >Click here in a perl script. > Could someone please help . Always change the subject when you're doinhg a new post. What problem are you having? First off make the thml correct: http://www.cnn.com";>Click

Re: Pairs have minimum difference

2003-01-24 Thread david
Nengbing Tao wrote: > -90 87658675 > 9012341324 > -198 47654567 > > Notice that |1500-1485|=|1500-1515|. > how can you have negative if they are abs? anyway, have you try: #!/usr/bin/perl -w use strict; my @xa=(8765,6000,4765,3000,1530,1500,1465,1234,1000); my @xb=(8675,600

RE: Link in perl

2003-01-24 Thread Manideepa Bhowmik
Hi Dan, I did as you suggested. print "http://www.cnn.com\";>Click here"; I don't get any compilation error, email goes fine to my groupwise mailbox. When I open hte mail, I see the raw html. http://www.cnn.com>Click here>> "Dan Muey" <[EMAIL PROTECTED]> 01/24/03 01:26PM >>> > > Hello folks, >

Re: Hash of Hashes of Arrays?

2003-01-24 Thread david
Glenn Tremblay wrote: > > This is what I need to do: > I believe I need a hash of hashes of arrays... > I am creating output in the format of inspection pages which list all > inspection stations in each town (some towns have only one, others have > several). > I need to group the lines (of addres

Re: Hash of Hashes of Arrays?

2003-01-24 Thread Glenn Tremblay
On Fri, 24 Jan 2003, david wrote: > Glenn Tremblay wrote: > > > > > This is what I need to do: > > I believe I need a hash of hashes of arrays... > > I am creating output in the format of inspection pages which list all > > inspection stations in each town (some towns have only one, others have >

RE: Link in perl

2003-01-24 Thread Dan Muey
> > Hi Dan, > I did as you suggested. > print "http://www.cnn.com\";>Click here"; > I don't get any compilation error, email goes fine to my > groupwise mailbox. When I open hte mail, I see the raw html. > http://www.cnn.com>Click here But I wanted only the "Click here" to be in the mail inste

RE: NewbieQuestion Deleting the first 5 lines of a file

2003-01-24 Thread Bob Showalter
Kipp, James wrote: > > > > perl -i.bak -ne 'print if $.>5; close ARGV if eof' *.txt > > > > > Bob > I have been trying to figure out a different solution then using the > -i arg. Is there a simple way to just open each file, delete the 5 > lines in place and close it(with no backup file), without

RE: NewbieQuestion Deleting the first 5 lines of a file

2003-01-24 Thread Kipp, James
have been trying to figure out a different solution then using the > > -i arg. Is there a simple way to just open each file, delete the 5 > > lines in place and close it(with no backup file), without getting > > into sysread, truncate, etc... > > Not really. What's the problem with using -i? not

Re: Hash of Hashes of Arrays?

2003-01-24 Thread Glenn Tremblay
On Fri, 24 Jan 2003, david wrote: > Glenn Tremblay wrote: > > > > Actually, the funny part of all this is that every station will be in the > > same state. I need to include the state information regardless. > > > > The output needs to allow me to loop through each city, somehow, and print >

Re: NewbieQuestion Deleting the first 5 lines of a file

2003-01-24 Thread Rob Dixon
James Kipp wrote: > have been trying to figure out a different solution then using the >>> -i arg. Is there a simple way to just open each file, delete the 5 >>> lines in place and close it(with no backup file), without getting >>> into sysread, truncate, etc... >> >> Not really. What's the problem

used sendmail to send an attachment

2003-01-24 Thread Jerry Preston
I use $mailprog = '/usr/lib/sendmail'; to send e-mail with. Can I use this to send an attachment? Thanks, Jerry

RE: used sendmail to send an attachment

2003-01-24 Thread wiggins
On Fri, 24 Jan 2003 14:50:02 -0600, "Jerry Preston" <[EMAIL PROTECTED]> wrote: > I use $mailprog = '/usr/lib/sendmail'; to send e-mail with. Can I use > this to send an attachment? > Yes, but you should avoid it if at all possible. Have you co

RE: used sendmail to send an attachment

2003-01-24 Thread Dan Muey
> > I use $mailprog = '/usr/lib/sendmail'; to send e-mail with. > Can I use > this to send an attachment? Yes sendmail handles attachments. Read this, you'll have an easier time after you do : http://www.tuxedo.org/~esr/faqs/smart-questions.html Now if I was a jerk I'd stop there and let

RE: NewbieQuestion Deleting the first 5 lines of a file

2003-01-24 Thread Kipp, James
> [snip] > > > > but we still have not changed the original file, have we :-) > > There isn't a way to edit a text file anywhere except the end > without copying the data. Deleting from the beginning requires > that all data after the deletion are moved up to the start of the > file. You could do

RE: used sendmail to send an attachment

2003-01-24 Thread Dan Muey
Yes I realize that link isn't the question page. But if you read what it says, namely, This site has moved change 'tuxedo' to 'catb' then you might deduce that the actual url is Going to be http://www.catb.org/~esr/faqs/smart-questions.html It changed since the last time I used it, so sorry if

RE: used sendmail to send an attachment

2003-01-24 Thread Scott, Deborah
Wow, this is kinda freaky Usually my perl email goes directly into a "perl" mail directory, but your two emails just popped into my work-inbox. I was just now starting to test a script for sending mail that works perfectly on a unix machine, but isn't working correctly on an NT server. That's

RE: used sendmail to send an attachment

2003-01-24 Thread Dan Muey
[snip] >I haven't used sendmail. Then what was ""I use $mailprog = '/usr/lib/sendmail'; to send e-mail with."" all about? >I have used SMTP server to send mail in groupwise environment. >Where should I look at in the 'catb' website. I'll even give you an anchor : 1 - Click here http://www.

Email function question

2003-01-24 Thread Scott, Deborah
I asked this before, but I probably made the question too long and confusing to follow. How do I send an email using perl? The path for the sendmail program is: h:/blah/blah/SENDMAIL/sendmail.exe I want it to open the contents of a particular file. Then send the contents of the file as a

Re: Email function question

2003-01-24 Thread Johnathan Kupferer
Don't use sendmail. Use one of the perl modules designed to communicate with SMTP servers like Mail::Sender or Mail::Sendmail (which, confusingly enough has nothing to do with the sendmail program). The documentation that comes with these modules should be more than enough to get you going.

Re: Email function question

2003-01-24 Thread jdavis
On Fri, 2003-01-24 at 15:35, Scott, Deborah wrote: > I asked this before, but I probably made the question too long and confusing > to follow. > > How do I send an email using perl? > The path for the sendmail program is: > h:/blah/blah/SENDMAIL/sendmail.exe > > I want it to open the conte

Re: Email function question

2003-01-24 Thread jdavis
On Fri, 2003-01-24 at 14:20, jdavis wrote: > On Fri, 2003-01-24 at 15:35, Scott, Deborah wrote: > > I asked this before, but I probably made the question too long and confusing > > to follow. > > > > How do I send an email using perl? > > The path for the sendmail program is: > > h:/blah/blah

Modules

2003-01-24 Thread Ismar . Dupanovic
Got 2 modules and a driver script that uses both. Both modules require Exporter and export their functions. However in my driver script I have to fully qualify the function names of the SECOND module(module->function), while the functions of the first module become part of my main:: package nam

ATL COM

2003-01-24 Thread Pankaj Kapare
Hi, Can anybody help me? Problem is like this: I have one com component namely ValidateLogin.In this component i have one interface namely Login. Under this Interface I have One method Validate,which takes two parameters and returns the result .Now I want to create the instance of this comp

changing backgorund color error

2003-01-24 Thread MJ
The below given part of code from a cgi script is working fine but when I try to change the back ground color to print "\n"; I get an internal server error. What is the problem or how do I change the background color sub return_html { print "Content-type: text/html\n\n"; print "\n"; pr