Perl code - Coverage

2002-01-17 Thread Rajanikanth Dandamudi
Hello, Can someone help me in getting the coverage of a perl program. I had used the Coverage module of the perl distribution by issuing a command: perl -d:Coverage script_name [ args ] Running the above command created a file by name: script_name.cvp This file script_name.cvp

RE:Perl tk window issue

2002-01-17 Thread Jorge Goncalvez
Hi,I have a perl tk script under windows where i refresh and update some widget in a window, i must destroy and redraw the window to have the modifications updated. But with this method every time the window is called (so destroyed and redrawed) the window goes to the left top corner of the

regexp hangs in perl 5.005_03 but not 5.6

2002-01-17 Thread Jon Molin
Hi list, I've got a pretty hairy regexp that hangs and i can't really understand why. It works just fine one my freebsd workstation running 5.6.1, but in linux with 5.005_03 it just dies. here is the code: $rule = A. TRAVEL ON BB CODESHARE ABTS BB1000 - BB7999 AND BB9000-BB NOT PERMITTED B.

Fianacial Julian Dates

2002-01-17 Thread Mark Martin
Hi, I'm trying to use the Time::JulianDay module to work with Julian Dates. However the dates are in a Financial system where today - 17/01/02 is represented by the Julian Date 102017. Any Julian Date calendee though will tell you today is 2452291.5 I'm lost - does anybodsy have any ideas? Mark

Re: Security advice: SHA vs crypt for authenticator

2002-01-17 Thread Daniel Gardner
Wednesday, January 16, 2002, 6:45:40 PM, [EMAIL PROTECTED] wrote: I'm using a nice little GDBM file for authentication. It just stores users and passwords as SHA1 hashes. When I need to authenticate someone (fewer than 15 lines in the dbm file) I just tie it and compare the SHA'd user input

Re: Perl code - Coverage

2002-01-17 Thread Daniel Gardner
Hello Rajanikanth, Thursday, January 17, 2002, 9:49:03 AM, Rajanikanth Dandamudi wrote: Hello, Can someone help me in getting the coverage of a perl program. I had used the Coverage module of the perl distribution by issuing a command: perl -d:Coverage script_name [ args ]

Re: Random Access Numbers

2002-01-17 Thread Frank
On Wed, Jan 16, 2002 at 10:25:35PM +, Naveen wrote: Is there is a built in function in Perl for generating random access #s? How would that function be used? ---end quoted text--- I've just google'd Random access numbers and there is very little there. Nothing that seems related to any

RE: Random Access Numbers

2002-01-17 Thread Groenwold, Harmen (ICT) (HK)
Hi, if you just want random numbers, there is a very simple function: RAND. Works like this: #!perl -w use strict; my ($varNumber); $varNumber = rand; print Random number is: , $varNumber,\n; Harmen Groenwold [EMAIL PROTECTED] -Original Message- From: Naveen Parmar [mailto:[EMAIL

Parsing log file line entries

2002-01-17 Thread Robin Brown
Hi, I have a perl script that came with SNIPS network monitoring that takes lines of a log file and parses them to create variables to be used to send pager alerts. It works as I like until I want to add that last variable, then it completely breaks. Log file line ( This is all on one line

Re: Greedy 'split' ???

2002-01-17 Thread Matthew Arrowsmith
No, you have to use a regular expression: my ( $DOM_NAME, $TLD ) = $domain =~ /(.+)\.(.*)/g; Looking at the domain fred.org.uk you would get fred.org and uk as your (.+) will do a greedy match. I think you want (.+?). Also, thinking about it, why do you want to do that globally (/g)? The

listing www pages on a IIS server via perl

2002-01-17 Thread Yacketta, Ronald
Folks, is it possible? is it do-able? can one generate a HTML listing of all web spaces on a IIS server? to include virtual webs, virtual dirs etc.. via perl? Regards, Ronald J. Yacketta Principal Consultant Ciber, INC 345 Woodcliff Dr. Fairport, NY 14450

Sendmail and PERL

2002-01-17 Thread Lysander
Okay, this is probably more of a sendmail than a PERL question so I apologize. If anyone can give me information or even point me to a sendmail list or resource I would appreciate it. I am writing a PERL script that takes incoming mail, parses the contents, and then uses them to update a

Re: Sendmail and PERL

2002-01-17 Thread Agustin Rivera
First thing I would do is check the permissions of the .forward file. It has to be VERY specific. I wish I remembered what it was.. Agustin Rivera Webmaster, Pollstar.com http://www.pollstar.com - Original Message - From: Lysander [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent:

catching an exception before it reaches command line

2002-01-17 Thread Alex Harris
The program I'm writing is going to run under a cron job. Therefore its important that I catch all exceptions in a file and not have them return to the command line. For instance the following: (system(ls *.r $plantfile) raises this exception at times: ls: 0653-341 The file *.r does not

Re: catching an exception before it reaches command line

2002-01-17 Thread Jon Molin
have BEGIN { open (STDOUT, '/some/log/file') } if you want it to file otherwise do, open (STDOUT, STDERR); and with shellstuff, redirects stdout, 2 redirects stderr so system (ls /apa /dev/null 21); redirects both outputs to /dev/null is that what you wanted? /Jon Alex Harris wrote:

RE: Out of memory!

2002-01-17 Thread Edson Alvarenga (EDB)
Jenda, Great !!! Now, the script works very well. Thank you very much for your help. Edson -Original Message- From: Jenda Krynicky [mailto:[EMAIL PROTECTED]] Sent: quarta-feira, 16 de janeiro de 2002 12:04 To: '[EMAIL PROTECTED]' Cc: Edson Alvarenga (EDB) Subject: Re: Out

Re: Sendmail and PERL

2002-01-17 Thread Roger Morris
chmod 700 should do it. Any group or world writable should kill it. I don't think sendmail complains about readable files as much as it does about writable files. What do the logs say? One other way is via a procmail recipe. Something like: :0 * /path/to/perlscript Roger At 08:15 AM

Re: Parsing log file line entries

2002-01-17 Thread William.Ampeh
In place of this: if(/.+\[(\S+)\]:\s+SITE|DEVICE\s+(\S+.+)\s+LEVEL\s+(\S+)\s+LOGLEVEL\s+(\S+) \s+STATE\s+(\S+.+)\s+.+$/) Use this: if(/.+\[(\S+)\]:\s+SITE|DEVICE\s+(\S+.+)\s+LEVEL\s+(\S+)\s+LOGLEVEL\s+(\S+) \s+STATE\s+(\S+)$/) It should work for STATE __ William Ampeh

Re: Finding a running process in Windows

2002-01-17 Thread Roger C Haslock
I have a copy of portix02b.zip which contains, inter alia, ps.exe. I don't have a copy of the URL where this came from, but it is an excellent set of the basic unix tools implemented for windows. - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, January

Re: Sendmail and PERL

2002-01-17 Thread Brett W. McCoy
On Thu, 17 Jan 2002, Lysander wrote: Okay, this is probably more of a sendmail than a PERL question so I apologize. If anyone can give me information or even point me to a sendmail list or resource I would appreciate it. I am writing a PERL script that takes incoming mail, parses the

perl and IIS

2002-01-17 Thread Yacketta, Ronald
Folks, looks like the exchange server her is not liking the topic :( maybe a new one will get replies posted to me.. is thier a utilit that can parse a web server and generate a listing (with links) of the web sites located on the server. I am not looking to worm other boxes etc.. just need a

can't write to a file in Linux, can in Unix....?

2002-01-17 Thread Brian Volk
Hello, I'm a rookie to perl as well as Linux and I'm stumped. Hopefully you can help me out. I've been reading a book on perl and in the book there are sample programs that I'm testing out. Here's the problem... I'm running RedHat 6.2, Perl 5.6 and I'm using the bash shell. First off, I

Re: can't write to a file in Linux, can in Unix....?

2002-01-17 Thread Tanton Gibbs
You probably want #!/usr/bin/perl instead of #!/bin/perl so that program.pl will work as expected. Also, you should always check the return value of open: open( DATAFILE, $datafile) or die Could not open datafile: $!\n; $! will have the system error that was given. One of the opens may have

Regex Assistance

2002-01-17 Thread John Edwards
Hi group. I have the following snippet of code. It's not working and I've been going round in circles trying to figure out why. I need a routine that will look at the filename, if that filename already exists, then add a (1) to the end. I've got the checking for existance sorted, it's the

Re: can't write to a file in Linux, can in Unix....?

2002-01-17 Thread shock
* Brian Volk ([EMAIL PROTECTED]) spake thusly: Hello, hello. #!/bin/perl ^ \___ there should be no leading space. #! should be the first 2 characters on the line. this is likely the cause of ./script.pl not working for you. $datafile = /files/perl/test.txt; $resultfile =

RE: Regex Assistance

2002-01-17 Thread Joshua Colson
I've commented out two lines in your code and replaced them with mine. I think it should work, but let us know if it doesn't. Good Luck! Joshua Colson Systems Administrator Giant Industries, Inc. (480) 585-8714 [EMAIL PROTECTED] -Original Message- From: John Edwards [mailto:[EMAIL

Re: Regex Assistance

2002-01-17 Thread Briac Pilpré
In article 2FB59B145095D511A7C90050BAC349F31730A3@MAIL, John Edwards wrote: I need a routine that will look at the filename, if that filename already exists, then add a (1) to the end. I've got the checking for existance sorted, it's the generation of the new file name that is the issue.

PERL Debugger trace question...

2002-01-17 Thread Richard.C.1
I'm new to using the debugger and have printed and read the debugger description and commands. It mentions that you can create a command/parameter file that contains commands but doesn't say how or where it must be located. I would like to have some way of doing an autotrace on a PL program as

Re: Regex Assistance

2002-01-17 Thread Frank
On Thu, Jan 17, 2002 at 05:42:31PM -, John wrote: -- code -- my ($name, $ext) = split(/\./,$fileoutname); if ($name =~ /\((\d{1,1})\)$/) { # Looks for (1) on the end for example my $number = $1; $number++; $name =~ tr/\(\d\)/\($number\)/; } else {

Re: Regex Assistance

2002-01-17 Thread Frank
On Thu, Jan 17, 2002 at 06:16:08PM +, Frank goofed: my $num= ($name=~/\((\d+\)/)?$1:1; $num++ while(-e $name($num).$ext); ---end quoted text--- Ah, forgot to paste the tested version back in my bad. #!/usr/bin/perl use strict; my($name,$ext)=('test','foo'); my $num=

RE: extracting links from HTML data (7my own problem usiing grep

2002-01-17 Thread sanilkumar
Friends, I am Sanil.I am a computer Science student.I want to study expect programming and python Qt. If anybody of you know this or sites for the corresponding tutorial please please mail to me. from

Re: Greedy 'split' ???

2002-01-17 Thread Dennis G. Wicks
What happens when you get something like ww10.software.mirror.qrp.org.de ?? try this : (my $DOM_NAME, my $TLD) = split(/\./, $domain, 2); #split on '.', onlu into 2 pieces (yes this is me answering my own question. . . . .) -Original Message- From: Scott Lutz

Re: Parsing log file line entries

2002-01-17 Thread John W. Krahn
Robin Brown wrote: Hi, Hello, I have a perl script that came with SNIPS network monitoring that takes lines of a log file and parses them to create variables to be used to send pager alerts. It works as I like until I want to add that last variable, then it completely breaks. Log

Re: Perl code - Coverage

2002-01-17 Thread Richard J. Barbalace
Rajanikanth Dandamudi [EMAIL PROTECTED] writes: Can someone help me in getting the coverage of a perl program. I had used the Coverage module of the perl distribution by issuing a command: perl -d:Coverage script_name [ args ] There's very little documentation in Devel::Coverage's

Re: Greedy 'split' ???

2002-01-17 Thread John W. Krahn
Matthew Arrowsmith wrote: No, you have to use a regular expression: my ( $DOM_NAME, $TLD ) = $domain =~ /(.+)\.(.*)/g; Looking at the domain fred.org.uk you would get fred.org and uk as your (.+) will do a greedy match. I think you want (.+?). No, this is what the original poster

Re: Sendmail and PERL (Solved)

2002-01-17 Thread Lysander
chmod 700 did the trick. Thank you so much! Sheridan - Original Message - From: Roger Morris [EMAIL PROTECTED] To: Agustin Rivera [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Thursday, January 17, 2002 10:37 AM Subject: Re: Sendmail and PERL chmod 700 should do it. Any group or world

Re: can't write to a file in Linux, can in Unix....?

2002-01-17 Thread John W. Krahn
Brian Volk wrote: Hello, Hello, Please change your line length to 80 characters or less I'm a rookie to perl as well as Linux and I'm stumped. Hopefully you can help me out. I've been reading a book on perl and in the book there are sample programs that I'm testing out. Which book?

Re: Regex Assistance

2002-01-17 Thread John W. Krahn
John Edwards wrote: Hi group. Hello, I have the following snippet of code. It's not working and I've been going round in circles trying to figure out why. I need a routine that will look at the filename, if that filename already exists, then add a (1) to the end. I've got the checking

which browser

2002-01-17 Thread Jerry Preston
Hi, How can I tell which browser is running my perl script? Thanks, Jerry -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Form to Flat File

2002-01-17 Thread Aaron White
Does anyone have a simple script that can handle about ten fields from a basic html form, that can be written to a flat file. -- /_/_/ Aaron K. White _/ _/ _/ _/ _/ Americas Mission Control _/_/_/ _/ _/ _/_/ _/ Web Administration Design _/ _/ _/

RE: which browser

2002-01-17 Thread RArul
Check for the %ENV Variable for HTTP_USER_AGENT. That contains the information of the browser executing the perl script. -- Rex -Original Message- From: Jerry Preston [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 17, 2002 3:59 PM To: begginners Subject: which browser Hi,

RE: which browser

2002-01-17 Thread Bob Showalter
-Original Message- From: Jerry Preston [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 17, 2002 3:59 PM To: begginners Subject: which browser Hi, How can I tell which browser is running my perl script? Assuming your running under a standard CGI environment:

Perl debugger window

2002-01-17 Thread Gary Hawkins
I mentioned the perl debugger before but I guess some people would not have had the GUI version available. It comes with the Perl Development Kit, so I should clarify. Don't know about *n*x but if you installed ActivePerl on Windows, then install the Perl Development Kit and try: perl -d

Smart grep

2002-01-17 Thread sahraoma
Hi all, I want to search for a particular pattern, say MIN_VALUE, in a series of files with a digit as extension, say *.[0-9] for example. These files are spread in a directory tree like this directory1 subdir1 XX233 subsubdir1 many_files

Re: Smart grep

2002-01-17 Thread John W. Krahn
[EMAIL PROTECTED] wrote: Hi all, Hello, I want to search for a particular pattern, say MIN_VALUE, in a series of files with a digit as extension, say *.[0-9] for example. These files are spread in a directory tree like this directory1 subdir1 XX233

Re: Perl debugger window

2002-01-17 Thread Jenda Krynicky
From: Gary Hawkins [EMAIL PROTECTED] I mentioned the perl debugger before but I guess some people would not have had the GUI version available. It comes with the Perl Development Kit, so I should clarify. Don't know about *n*x but if you installed ActivePerl on Windows,

int()

2002-01-17 Thread Naveen Parmar
Should int(-1.5) return -2? - NP _ Chat with friends online, try MSN Messenger: http://messenger.msn.com -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

RE: int()

2002-01-17 Thread Mark Anderson
no. int(-1.5) returns -1. from perldoc -f int: You should not use this function for rounding ... it truncates towards 0 This means that whatever real number is passed to it, it returns without whatever follows the decimal point, int(1.99) returns 1 and int (-1.99) returns -1.

RE: int()

2002-01-17 Thread Stout, Joel R
From previous post: $q = int( $p ); # goes towards zero $r = ceil( $p );# goes to next highest integer $s = floor( $p ); # goes to next lowest integer -Original Message- From: Naveen Parmar [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 17, 2002 2:15 PM To:

question re mtiong email tags

2002-01-17 Thread mike
Hi I have been trying to set oup a script for munging html files My problem is trying to match tags in html which of course have specific meanings in perl. Does anyone hve any advice on this or know of a good resource (this is something of a building up expertise in perl fundamentals so not

Create a file in CGI!??!

2002-01-17 Thread Dragos Dorin
How to create a file in cgi. How to (re)write in file and append.

Re: Perl code - Coverage

2002-01-17 Thread Rajanikanth Dandamudi
Richard J. Barbalace, Daniel Gardner, I am very thankful to both of you on helping me in this regard. I am using the coverperl tool to get the coverage information from the script_name.cvp file. Once again thank you very much. Thanks and Regards Rajanikanth Richard J. Barbalace wrote:

RE: Create a file in CGI!??!

2002-01-17 Thread Gary Hawkins
Uh-huh, ok. Here are the results of your query. Your search found 824,000 results: http://www.google.com/search?num=100hl=enq=How+to+create+a+file+in+cgi Pretty broad topic. -Original Message- From: Dragos Dorin [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 17, 2002 7:37 PM

Modules needed for Validation

2002-01-17 Thread Connie Chan
Hi all, Is there any module can use to verify data type (String, Integer, floating, Hex, valid email address, valid url etc.) ? Thank you very much.

how to set the env var?

2002-01-17 Thread yun yun
I programmed a .pl use DBI, but it says that Can't connect(DBI::Access::db1 HASH(0x1aff0bc)), no database driver specified and DBI_DSN env var not set at edit3.pl line 10 How should I set the DBI_DSB env var? _ Do You Yahoo!?

Re: Tables in CGI

2002-01-17 Thread Gerry Jones
On Tuesday 15 January 2002 18:00, Roger C Haslock wrote: I was watching this correspondance earlier, and wondering why you are not using fetchrow_hashref. I now wonder why you get all the rows of data bundled into a single array. Does your interface have now way of returning data one row at a

Re: Cgi on IIS

2002-01-17 Thread K.L. Hayes
Hello Maureen, The only time I've seen the HTTP Error 405- when submitting a form is when I've inadvertently used action=post instead of action=POST which I see you've done in your script. I must have banged my head on that for over an hour before I figured it out. Hope this helps. -- Best

Re: mail-question

2002-01-17 Thread John Griffiths
Hi Peter, I have had such a Perl system running for 4 years on a linux server. I use sendmail, CPAN modules for reading and sending attachments. Have you made any progress? Tell me MAILTO:[EMAIL PROTECTED]?Subject=PerlMail a bit more about your project, I could share some code with you. Peter

Re: Tables in CGI

2002-01-17 Thread Roger C Haslock
Sorry. That line should probably be foreach (0..$#columns) Odd message, though. - Roger - - Original Message - From: Gerry Jones [EMAIL PROTECTED] To: Roger C Haslock [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Thursday, January 17, 2002 10:51 AM Subject: Re: Tables in CGI On Tuesday