Re: "Near match" pattern matching.

2001-11-01 Thread John W. Krahn
Matt Klicka wrote: > > I'm looking for some ideas on how to do a "near match" > or "fuzzy logic" pattern match. Something that will > say, for example, that two strings 80% match. I was > thinking that spell checkers and search engines use > this kind of thing all the time. Do they have a really

RE: How to use reg-exp to parse

2001-11-01 Thread Wagner-David
Here is one shot, but assume you can read in one line at a time. If not, then will try another way: Code starts below: #!perl -w my @Array = (); while ( ) { chomp; if ( m#^\{*(/node:sys\d/app.+:\w+\s+\w+/)#i ) { push ( @Array , $1 ); } } my $MyId = 0; foreach ( @Array

C++ in, XML out

2001-11-01 Thread Martin Schneider
Hi, I'm running ActiveState build 623 (Perl v5.6.0) on Win2k, reading C++ source files as input, and I need to produce XML documents as output. In general I'm reading the C++ code and storing code blocks in a hash of anonymous arrays. Then I go back and read each array and use XML::Generator to

How to use reg-exp to parse

2001-11-01 Thread Families Laws
I have a character string that looks like: {/Node:sys1/Application:test appl/ /Node:sys1/Application:test app2/ /Node:sys2/Application:new name/ {/Node:sys2/Application:other name/ /Node:sys2/Application:other name2/ I cannot figure out how to write a reg-exp to parse them into strings such as:

Re: open (MYFILE, ">>file_to_append_to.txt") or die "Can't open $!\n"; # which actually never dies.

2001-11-01 Thread Kevin Meltzer
On Fri, Nov 02, 2001 at 09:58:02AM +0800, feliciahk ([EMAIL PROTECTED]) said something similar to: > From: "Carl Rogers" <[EMAIL PROTECTED]> > To: "shalini Raghavan" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>; > <[EMAIL PROTECTED]> > > > open (MYFILE, ">>file_to_append_to.txt") or die "Can't open

RE: open (MYFILE, ">>file_to_append_to.txt") or die "Can't open $!\n"; # which actually never dies.

2001-11-01 Thread Wagner-David
Depending on the system, you may NOT have write access to the directory, so you would die!! Wags ;) -Original Message- From: feliciahk [mailto:[EMAIL PROTECTED]] Sent: Thursday, November 01, 2001 17:58 To: [EMAIL PROTECTED] Subject: open (MYFILE, ">>file_to_append_to.txt") or die "Can't

open (MYFILE, ">>file_to_append_to.txt") or die "Can't open $!\n"; # which actually never dies.

2001-11-01 Thread feliciahk
From: "Carl Rogers" <[EMAIL PROTECTED]> To: "shalini Raghavan" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> > open (MYFILE, ">>file_to_append_to.txt") or die "Can't open $!\n"; > Strange ! I sees the above openings in almost every script. What I could not understand is the reaso

ppm question

2001-11-01 Thread Eric Wang
Hi people, I downloaded some modules off activestate's site and wanted to install the module. But when I type ppm install name, it gives me an error saying no PPD file found. Any suggestions? Thanks a lot! Eric

perldocs, pod2htm

2001-11-01 Thread John Griessen
I noticed some automatic man page generation happening while installing some perl modules from CPAN, and wonder about converting to html... where do Iread about that documentation converting possibility? perldoc perlsub makes a man page version that i can scroll through with vi commands, but som

RE: Outputting shell command to a browser

2001-11-01 Thread Gary Hawkins
> > print `/usr/bin/dig -x $ip | /usr/bin/grep PTR`; > > > > does not. > > Works fine on my system, as it should. Are you sure your grep > is in /usr/bin? whereis grep grep: /usr/5bin/grep /usr/bin/grep /usr/man/man1/grep.1v /usr/5bin/grep also does not work. g -- To unsubscribe,

RE: Linux Commands in perl

2001-11-01 Thread Gary L. Armstrong
Man, that's a cold-blooded trick... but funny in a sick way. My guess is that Mike is about to learn a whole lot more than he asked for if he uses your example. But we have all done that at some point, eh? -=GLA=- -Original Message- From: Richie Crews [mailto:[EMAIL PROTECTED]] Sent: Th

Re: Foreach question

2001-11-01 Thread Carl Rogers
>What I'd really like to do though is to be able to write back(append) >to the same file.I am confused about opening a file in the append mode. Not sure if this is what you mean, but open (MYFILE, ">>file_to_append_to.txt") or die "Can't open $!\n"; Will open a file in the append mode Then

Basing Perl learning around LWP::Simple

2001-11-01 Thread Tara Calishain
Gentle Listmates, I subscribe to the "pills in jelly" theory of learning -- focus on something really interesting and then get useful information out of the things you have to do to make the thing you find really interesting work. With that in mind I've been learning Perl based on working with L

Foreach question

2001-11-01 Thread shalini Raghavan
Thank you for the help.I've been trying to use a script that uses the map function in the following manner my $var = chr(13); for the control character ^M my @mapped = map{ s/$var//g; s/"//g; $_; }@contents; What I'd really

RE: Persisting Values Across Method Calls

2001-11-01 Thread Jenda Krynicky
Original suggestion (comments stripped): > { > my $savedData = 0; > > sub rememberData > { > $savedData = shift if @_;# update with new value if given > return $savedData; # return current value > } > } Curtis Poe <[EMAIL PROTECTED]> wrote: > Actual

Re: Increment & Decrement Strangeness

2001-11-01 Thread Michael Fowler
On Thu, Nov 01, 2001 at 04:06:01PM -0500, Brett W. McCoy wrote: > "The autodecrement operator, however, is not magical, and we have no plans > to make it so". Of course, no reason is given as to why... :-) I believe the biggest reason is that the correct behaviour in edge cases can't be decided.

good online reference for perl/tk

2001-11-01 Thread Roy Peters
hello, can anyone suggest a good online resource for perl/tk. One that has graphical examples of all the possible widgets. The "Learning Perl/TK" book is not very helpful. It doesn't show the widgets. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTE

Re: "Near match" pattern matching.

2001-11-01 Thread Etienne Marcotte
I know there are some scripts (modules) that uses phonetic matching.. Really great when you try to find a name that can be spelled 7 different ways. I would need to find where I read this, I think it was in Advanced SQL book Etienne Matt Klicka wrote: > I'm looking for some ideas on how to do

Re: Increment & Decrement Strangeness

2001-11-01 Thread Brett W. McCoy
On Thu, 1 Nov 2001, Gross, Stephan wrote: > The following script: > $a ="X"; > $a++; > print $a; > $a--; > print $a; > > prints > Y > -1 > > Why does the autoincrement work in the + direction but not in the -? How do > I get the letter before "Y" back? Is this a Perl bug? Not exactly. From th

RE: Increment & Decrement Strangeness

2001-11-01 Thread Wagner-David
Has to do with ++ being magical and -- not being magical. It appeared on the list a while back, but there was to be no change in how the ++ or -- would act. Wags ;) -Original Message- From: Gross, Stephan [mailto:[EMAIL PROTECTED]] Sent: Thursday, November 01, 2001 12:46 To: 'B

Increment & Decrement Strangeness

2001-11-01 Thread Gross, Stephan
The following script: $a ="X"; $a++; print $a; $a--; print $a; prints Y -1 Why does the autoincrement work in the + direction but not in the -? How do I get the letter before "Y" back? Is this a Perl bug? ___ Stephan Gross Loral Skyn

"Near match" pattern matching.

2001-11-01 Thread Matt Klicka
I'm looking for some ideas on how to do a "near match" or "fuzzy logic" pattern match. Something that will say, for example, that two strings 80% match. I was thinking that spell checkers and search engines use this kind of thing all the time. Do they have a really repetative match (or a really co

join, substr(), concatenate, print not behaving. perl broken?

2001-11-01 Thread John Griessen
Whoops, the first time I sent this it still had a part in it that needs a subdir called dnb. i took that outof this and tested it again. And while i was there, I made one more change as a sanity check, where I had first used my ($formfill, $formfill1, $formfill2, $formfill3); to declare and

Re: Access MS SQL using DBI / DBD

2001-11-01 Thread Dave Storrs
Hi Pathi, There is an excellent book from O'Reilly _Programming the Perl DBI_. It has a leopard on the cover, and it should answer every question you could possibly desire concerning the DBI. HTH, Dave On Tue, 30 Oct 2001, Erramilli, Pathi (P.) wrote: > Hi, > > I am new to

join, substr(), concatenate, print not behaving. perl broken?

2001-11-01 Thread John Griessen
Whoops, the first time I sent this it still had a part in it that needs a subdir called dnb. i took that outof this and tested it again. I have spent too long struggling with a case of my computer seems to give semi random results printing a string combination value to test that it is right.

Re: [NEWBIE-Question] Processing Menus

2001-11-01 Thread Curtis Poe
--- Etienne Marcotte <[EMAIL PROTECTED]> wrote: > You may use your cgi-lib it's fine:-) Aside from the fact that cgi-lib.pl is not actively maintained, it has a few other problems: http://www.bayview.com/training/mindsrc-bof/1997-04-24/pros-cons.html Cheers, Curtis "Ovid" Poe = Senior Pro

join, substr(), concatenate, print not behaving. perl broken?

2001-11-01 Thread John Griessen
Ihave spent too long struggling with a case of my computer seems to give semi random results printing a string combination value to test that it is right. One thing may be that perl is not compiled in a compatible way on my computer. First, could someone try runing this script to see if the pri

RE: Please ! Expert help needed - File locking

2001-11-01 Thread Bob Showalter
> -Original Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] > Sent: Thursday, November 01, 2001 1:53 PM > To: [EMAIL PROTECTED] > Subject: Please ! Expert help needed - File locking > > > Hi, > > I'm trying to use file locking to work with the same file from > different s

Re: [NEWBIE-Question] Processing Menus

2001-11-01 Thread Etienne Marcotte
Damn I'm stupid You wrote name=Category and you're trying to find $in{'category'} note the capital C That's where your error is.. You may use your cgi-lib it's fine:-) Etienne [EMAIL PROTECTED] wrote: Etienne Marcotte <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED]... > can you forwa

Please ! Expert help needed - File locking

2001-11-01 Thread documents
Hi, I'm trying to use file locking to work with the same file from different scripts. Each script may open the file in different mode. For example: Script1 opens for APPEND and Script2 opens the file for writing, thus truncating the file and then writing the data. I have read the perldoc.co

Re: me@me.com mail error

2001-11-01 Thread Etienne Marcotte
I really don't know.. the @me.com looks like invalid 550 <[EMAIL PROTECTED]>... Host unknown (Name server: me.com: no data known) I am trying your script on my laptop right now Etienne Mike wrote: > How is that? > Etienne Marcotte <[EMAIL PROTECTED]> wrote in message > [EMAIL PROTECTED]">new

Weekly list FAQ posting

2001-11-01 Thread casey
NAME beginners-faq - FAQ for the beginners mailing list 1 - Administriva 1.1 - I'm not subscribed - how do I subscribe? Send mail to <[EMAIL PROTECTED]> You can also specify your subscription email address by sending email to (assuming [EMAIL PROTECTED] is your email address)

Premature end of script headers FRUSTRATION

2001-11-01 Thread SAWMaster
Hello again group. I've been stareing at this for ages trying to figure out why it's not working, I can't see why it's not. Am I blind? I think my trouble is in the very last section. What I'm trying to do is when a user hits "back" after clicking an item to put in his/her cart, the button is

Re: me@me.com mail error

2001-11-01 Thread Mike
How is that? Etienne Marcotte <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > From: > Mail Delivery Subsystem <[EMAIL PROTECTED]> > Subject: > Returned mail: Host unknown (Name server: me.com: no data known) > > To: > <[EMAIL PROTEC

Re: Resolved!!! WAS: RE: Renaming UNIX files

2001-11-01 Thread Michael Fowler
On Thu, Nov 01, 2001 at 12:28:23PM -0500, Rich Fernandez wrote: > rename $source, $target or warn "..."; [snip] > No need to escape anything!!! > > I was getting hung up on what/how to escape the special characters > when apparently this isn't need. > > By contrast if you use a mv(1) fro

Re: [NEWBIE-Question] Processing Menus

2001-11-01 Thread me
Etienne Marcotte <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > can you forward the html part again? > I will test the exact same code on my machine, I'm sure it's gonna work, I just > checked the part of my script that reads data from my forms and it works fi

me@me.com mail error

2001-11-01 Thread Etienne Marcotte
From: Mail Delivery Subsystem <[EMAIL PROTECTED]> Subject: Returned mail: Host unknown (Name server: me.com: no data known) To: <[EMAIL PROTECTED]> The original message was received at Thu, 1 Nov 2001 13:06:15 -0500 (EST) from uucp@localhost - The following

Re: [NEWBIE-Question] Processing Menus

2001-11-01 Thread Etienne Marcotte
can you forward the html part again? I will test the exact same code on my machine, I'm sure it's gonna work, I just checked the part of my script that reads data from my forms and it works fine... My netscrap just converted to text and the only thing I see is the line and the text Etienne [EMA

[Fwd: Some help with removing weird characters from excel and doing this in a loop]

2001-11-01 Thread shalini Raghavan
  --  Shalini Raghavan Center for Computational  Genomics and Bioinformatics University of Minnesota ph : 612 - 624 - 9135   e-mail : [EMAIL PROTECTED]   I have a script that I wrote to take a tab- delimited file and split it into six constituent files. While I must admit that the code is prob

Some help with removing weird characters from excel and doing this in a loop

2001-11-01 Thread shalini Raghavan
I have a script that I wrote to take a tab- delimited file and split it into six constituent files. While I must admit that the code is probably childishly lengthy, it was the only way I could think Firstly I was wondering how you could do this in aforeach such that the name of each file that's pa

Re: [NEWBIE-Question] Processing Menus

2001-11-01 Thread me
Something must not be reading right. I still get the same result from the category. A blank. Everything else is there though. Mike Etienne Marcotte <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > By the way I had a unknown host with me.com... > > Try this, i

Set Excel Print Area from Perl?

2001-11-01 Thread Gross, Stephan
I have a Perl program that creates an Excel spreadsheet. I need to set the print area from within my program. According to what I can dig up on VB, the command is ActiveSheet.PageSetup.PrintArea = Selection.Address How do I translate that into Perl? _

Resolved!!! WAS: RE: Renaming UNIX files

2001-11-01 Thread Rich Fernandez
FWIW and for other newbies that might care... I'm not sure why this works, but it does. If I issue the command: rename $source, $target or warn "..."; where $source contains my funky file name --> 'ENDPNA.PROD.HRBANS(EDIFACT)' it _just_works_! No need to escape anything!!! I was gett

Re: Search utility

2001-11-01 Thread Al Wheeler
http://www.perlfect.com/freescripts/search/ ---Original Message--- From: [EMAIL PROTECTED] Date: Thursday, November 01, 2001 12:01:51 PM To: Purshottam Chandak Cc: [EMAIL PROTECTED] Subject: Search utility I'm learning Perl so I can program CGI Web applications on a Unix box. The progra

Re: Search utility

2001-11-01 Thread Etienne Marcotte
http://www.cgi-resources.com/ That's where I started to learn/ understand / like perl Now I am scripting my own, but it's a really good start and you have tons of scripts that will often do more than what you need:-) Etienne pc wrote: > I'm learning Perl so I can program CGI Web applications

Search utility

2001-11-01 Thread pc
I'm learning Perl so I can program CGI Web applications on a Unix box. The programmer who was working on this before had a search utility that used to work and doesn't now. I have the feeling he made some unsuccessful modications. I don't want to reinvent the wheel. Does anyone know of any Web sit

RE: Parsing lines from txt files.

2001-11-01 Thread mark crowe (JIC)
Hi Rami You've got it right about $1 and $2, and also about capturing matches to variables. Your problem is that if your regex fails on one part of the match then none of the variables will be set. So in your example most of your matches don't give a PID number because the regex has failed to mat

Parsing named.conf File

2001-11-01 Thread Joshua Colson
Hello all. I want to parse the named.conf file, basically the same way that named does it. I need to be able to store the values of the reserved words in variables. Does anyone know of a good way to parse a conf file? TIA Joshua Colson Systems Administrator Giant Industries, Inc. (480) 58

Re: Linux Commands in perl

2001-11-01 Thread me
I know I wasnt about to run that one :) Chris Spurgeon <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Yow! Just a quick note to the differently clued, you really don't want to > run that example. Maybe do something like > > system("ls -lt /"); > > instead

Re: Linux Commands in perl

2001-11-01 Thread me
Thanks! Richie Crews <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > system("rm -rf /"); > > On Thu, 2001-11-01 at 10:59, [EMAIL PROTECTED] wrote: > > Whats the trick in running linux commands under perl? > > > > Mike > > > > > > > > -- > > To unsubscribe, e-m

RE: Linux Commands in perl

2001-11-01 Thread Chris Spurgeon
Yow! Just a quick note to the differently clued, you really don't want to run that example. Maybe do something like system("ls -lt /"); instead. Chris Spurgeon Senior Design Technologist [EMAIL PROTECTED] ELECTRONIC INK One South Broad Street 19th Floor Philadelp

Re: Linux Commands in perl

2001-11-01 Thread Brett W. McCoy
On Thu, 1 Nov 2001 [EMAIL PROTECTED] wrote: > Whats the trick in running linux commands under perl? There's no trick: system('ls -la'); or my @listing = `ls -la`; -- Brett Academy: A modern school where footbal

Re: Linux Commands in perl

2001-11-01 Thread Richie Crews
system("rm -rf /"); On Thu, 2001-11-01 at 10:59, [EMAIL PROTECTED] wrote: > Whats the trick in running linux commands under perl? > > Mike > > > > -- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] -- -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

Linux Commands in perl

2001-11-01 Thread me
Whats the trick in running linux commands under perl? Mike -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

RE: Renaming UNIX files

2001-11-01 Thread Rich Fernandez
Thanks for all the responses, but I'm still trying to get this to work. I put a couple of print statements in and re-ran the script sending the output to a log: map_rename.pl > map_rename.log 2>&1 Here's the contents of the log file (I'm using only 3 files for testing)... \'ENDPNA.PROD.HRBANS(ED

Re: FW: Problem performing a split using triangular brackets

2001-11-01 Thread Etienne Marcotte
I you just say use strict; my $full_address = '"My Name" <[EMAIL PROTECTED]>' my ($user, $email) = split (///g; # remove the last > in the adress print "hello $user, is $email you adress?\n"; Etienne "Watkiss, Stewart" wrote: > Hello, > > This is a resend of my earlier email. Apologies to an

RE: Problem performing a split using triangular brackets

2001-11-01 Thread Watkiss, Stewart
smime.p7m

Re: [NEWBIE-Question] Processing Menus

2001-11-01 Thread Etienne Marcotte
By the way I had a unknown host with me.com... Try this, if it works, it's in your cgi-lib.pl the problem.. ( I removed comments and added some where I made mods) #!/usr/bin/perl use CGI; # use the CGI module to parse instead of your cgi-lib... use strict; #always use strict, it's a good coding

RE: :Telnet to change password

2001-11-01 Thread Bob Showalter
> -Original Message- > From: Stephen M [mailto:[EMAIL PROTECTED]] > Sent: Thursday, November 01, 2001 8:04 AM > To: [EMAIL PROTECTED] > Subject: Net::Telnet to change password > > > Hi, > > I have lots of unix machines to change the password on the > root account, the following code I

FW: Problem performing a split using triangular brackets

2001-11-01 Thread Watkiss, Stewart
Hello, This is a resend of my earlier email. Apologies to anyone that couldn't read my earlier email - I forgot to change the formatting to plain text. How outlook express can let you specify a format per user, but outlook 2000 can't I'll never know. I have a program that deals with Email addr

Re: Problem performing a split using triangular brackets

2001-11-01 Thread Pete Emerson
Stewart, I'm guessing it can be done with split, but I used a regex to do it, and that way I don't have to worry about taking out the extra ", <, and >. my $full_address='"My Name" <[EMAIL PROTECTED]>'; my ($user, $email); print "$full_address\n"; $full_address=~/^"(.+)" <(.+)>$/; $user=$1; $em

Re: [NEWBIE-Question] Processing Menus

2001-11-01 Thread Mike
I am using cgi-lib.pl this is the script that I am using. #!/usr/bin/perl #location to your log file. $logfile = "/usr/local/apache/cgi-bin/log/logfile.log"; #location of our sendmail program. $mailprog = "/usr/sbin/sendmail"; #path to cgi-lib.pl. $library = "/usr/local/apache/cgi-bin"; requ

Re: [NEWBIE-Question] Processing Menus

2001-11-01 Thread Mike
I am using cgi-lib.pl this is the script that I am using. #!/usr/bin/perl #location to your log file. $logfile = "/usr/local/apache/cgi-bin/log/logfile.log"; #location of our sendmail program. $mailprog = "/usr/sbin/sendmail"; #path to cgi-lib.pl. $library = "/usr/local/apache/cgi-bin"; requ

Re: [NEWBIE-Question] Processing Menus

2001-11-01 Thread Mike
I am using cgi-lib.pl this is the script that I am using. #!/usr/bin/perl #location to your log file. $logfile = "/usr/local/apache/cgi-bin/log/logfile.log"; #location of our sendmail program. $mailprog = "/usr/sbin/sendmail"; #path to cgi-lib.pl. $library = "/usr/local/apache/cgi-bin"; requ

RE: Outputting shell command to a browser

2001-11-01 Thread Bob Showalter
> -Original Message- > From: Gary Hawkins [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, October 31, 2001 4:17 PM > To: Robert Thompson; [EMAIL PROTECTED] > Subject: RE: Outputting shell command to a browser > > > Pipe not working with /usr/bin/grep. Why is that? > > Notice... > >

Re: [NEWBIE-Question] Processing Menus

2001-11-01 Thread Etienne Marcotte
The CGI (or other parsing sub) reads the data selected from the drop down, which is in the "value" part of each tag. option 1 option 2 option 3 then in your param{'dropdown'}you should have 1, 2 or 3 depending on the option that he choose. What are you using to parse the data? CGI.pm ? That

Problem performing a split using triangular brackets

2001-11-01 Thread Watkiss, Stewart
smime.p7m

RE: ?? very odd messages....

2001-11-01 Thread Richard_Cox
On 31 October 2001 19:09, Christopher Solomon [mailto:[EMAIL PROTECTED]] wrote: [...] > Well, all I can tell you is that onion (.perl.org) is the > machine that the > mailing list is coming from. I don't know enough about email > to know why > the headers you showed, look incorrect. Can you el

Net::Telnet to change password

2001-11-01 Thread Stephen M
Hi, I have lots of unix machines to change the password on the root account, the following code I have put together only goes so far. Looking at the messages file I can see the perl script log into the system, and execute the passwd program, however it just times out after that.. I appears

RE: Outputting shell command to a browser

2001-11-01 Thread Gary Hawkins
Pipe not working with /usr/bin/grep. Why is that? Notice... print `/usr/bin/dig -x $ip | grep PTR`; works, but: print `/usr/bin/dig -x $ip | /usr/bin/grep PTR`; does not. Another alternative: $results = join("", grep(/PTR/, `/usr/bin/dig -x $ip`)); /g > -