RE: Little code fragment request (Is this code ok?)

2002-05-07 Thread Scot Robnett
Is this on UNIX? Somebody on the list please correct me if I'm wrong, but I don't believe flock will work on Windows, and I have no idea about Mac. Scot Robnett inSite Internet Solutions [EMAIL PROTECTED] [EMAIL PROTECTED] -Original Message- From: Rafael Cotta [mailto:[EMAIL

Re: Little code fragment request (Is this code ok?)

2002-05-07 Thread Rafael Cotta
Yes, it is UNIX. I also read it won't work on Windows. Rafael Scot Robnett [EMAIL PROTECTED] escreveu na mensagem [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Is this on UNIX? Somebody on the list please correct me if I'm wrong, but I don't believe flock will work on Windows, and I have no

Re: trouble setting up (solution?)

2002-05-07 Thread Jake
Several people have responded so I thought I'd post my solution... In commonhttpd.conf (someone keeps changing the configuration file) there were the following lines... Directory /var/www/cgi-bin AllowOverride All Options ExecCGI /Directory and I inserted a couple of lines so it now

Accessing form elements before submit..

2002-05-07 Thread onkar sangoram
Hi , I badly need ur help regarding to the CGI scripts. i have written one perl script to design a tree ,with recursive function in it. I am accepting parameters from the user (STDIN) and then splicing the array.The things are fine. But when i want to put it in the web page,there will be a

Mod Perl / CGI problem

2002-05-07 Thread Elwyn Chow
Hi, Is there a good web site where I can get tips of potential modPerl problems, particularly relating to CGI? Also, I'm getting a modPerl problem with my script: I keep finding that $param{form}{type} has the wrong value in it. Any help would be greatly

Re: Mod Perl / CGI problem

2002-05-07 Thread Elwyn Chow
Hi, I forgot to ask this... In the other parts of my modPerl script, are there any other glaring errors in my programming style that I've programmed for modPerl besides the problem with that particular variable and what's the easiest way to fix them without changing my

Re: Accessing form elements before submit..

2002-05-07 Thread David vd Geer Inhuur tbv IPlib
Hi Onkar, Yes there is a solution, Javascript :) Maybe you'dd take a look at : http://codepunk.hardwar.org.uk/bjs.htm Believe me, it's easier than you think. Good luck. David Hi , I badly need ur help regarding to the CGI scripts. i have written one perl script to design a tree ,with

(OT) Re: Accessing form elements before submit..

2002-05-07 Thread John Brooking
To expand a bit from a more general persective: The important distinction here is what is client-side and what is server-side. HTTP is a request/response protocol. So the interaction looks like this: 1) User (Client) requests page where your form is 2) Server delivers that page 3) User

Re: Accessing form elements before submit..

2002-05-07 Thread MARCOS LABORDE
You can do client processing in javascript but you can also put your values in hidden fields as you change your array of values, use one button for the final submit and other submit buttons disguised as preprocessing buttons. onkar sangoram [EMAIL PROTECTED] 05/07/02 06:58AM Hi , I badly

RE: Matching string (here I am again)

2002-05-07 Thread Camilo Gonzalez
Try /[a-z]*\d[2]/ -Original Message- From: Rafael Cotta [mailto:[EMAIL PROTECTED]] Sent: Tuesday, May 07, 2002 12:16 PM To: [EMAIL PROTECTED] Subject: Matching string (here I am again) First of all, special thanks to Drieux. I need to check if a string with the following patern:

(OT) RE: Matching string (here I am again)

2002-05-07 Thread John Brooking
Okay, what's the [2] doing? It appears to be saying to match \d exactly two times, but I thought that would be {2} instead. But changing your [] to {} leads to the same problem as the original expression. You probably know, Camilo, but since you didn't say, let me guess at why Rafael's original

RE: Little code fragment request (Is this code ok?)

2002-05-07 Thread Bob Showalter
-Original Message- From: Rafael Cotta [mailto:[EMAIL PROTECTED]] Sent: Tuesday, May 07, 2002 2:15 AM To: [EMAIL PROTECTED] Subject: Re: Little code fragment request (Is this code ok?) Well, after searching I come to this: #--- sub WriteLog {

RE: Taking data from the screen to a file

2002-05-07 Thread Timothy Johnson
Here's one take on this off the top of my head(I haven't tested it, but I _think_ it will work). The text you are looking for is bordered by a line that starts with the word User after some spaces, and a line that has only white space. It seems like there should be a better way somewhere, but

Re: Piping mail spool through a Perl script?

2002-05-07 Thread Sudarsan Raghavan
jc wrote: Hello, I inherited a project where we use a procmail filter to filter emails as they come to our web server and pipe them through a perl script. The script called filterme goes through the email line by line and grabs information on the email, puts it into an array, and when it

RE: Piping mail spool through a Perl script?

2002-05-07 Thread Timothy Johnson
Is there a particular line or lines of text that delimits each email? -Original Message- From: jc To: [EMAIL PROTECTED] Sent: 5/6/02 11:03 PM Subject: Piping mail spool through a Perl script? Hello, I inherited a project where we use a procmail filter to filter emails as they come

Re: Taking data from the screen to a file

2002-05-07 Thread Felix Geerinckx
on Tue, 07 May 2002 05:04:56 GMT, [EMAIL PROTECTED] (Melissa Cama) wrote: [...] From this i need to extract just the user names and place them into an external file. How do I go about this? #! perl -w use strict; my @users; open (IN, particular.exe |) or die Cannot pipe:

Re: Taking data from the screen to a file

2002-05-07 Thread John W. Krahn
Melissa Cama wrote: Hi, Hello, I'm just new to Perl and have no idea where to start with the task that I have to complete. Any help would be appreciated. Currently when a particular .exe is run, the following is displayed in the command window - License server on host kronos.

RE: Bulk mail tests

2002-05-07 Thread Anders Holm
Hi John. Sorry for my late reply, I'm checking these mails at work, and we had a Bank Holiday here yesterday. Cheers for the pointers! I'll play around with this a bit more to see what I get. Best Regards Anders Holm Critical Path Technical Support Engineer

Ok- real dumb question

2002-05-07 Thread Marc M Dawson
I am supposed to parse a text file such as this- 781457 Hartanto Victor Setiawan [EMAIL PROTECTED] 777557 Hatfield Benjamin [EMAIL PROTECTED] 779777 Henry James [EMAIL PROTECTED] 777947 Hergert Michael William [EMAIL PROTECTED] 778097 Iverson Jennifer Marsee [EMAIL PROTECTED] As you can

To fetch datas from text file

2002-05-07 Thread en_prashant
Sir, I had already mailed u for a particular solution.The basic problem is that we have a log file that is created by proxy server to keep the account of the users.The format of log file is as 192.200.9.224,prashant, ,Y,22/04/02,12:09:09, , , http, ,, ,12 , , ,

Graphics Library

2002-05-07 Thread Arran
Does perl have an graphics library where you could create your own graphics? and how would i go by using it? From: Arran For more contact details goto: Http://www.arran4.8m.com/ /This document is provided in HTML as well as text/ If builders built buildings the way programmers wrote programs,

Re: Piping mail spool through a Perl script?

2002-05-07 Thread John W. Krahn
Jc wrote: Hello, Hello, I inherited a project where we use a procmail filter to filter emails as they come to our web server and pipe them through a perl script. The script called filterme goes through the email line by line and grabs information on the email, puts it into an array, and

Re: Ok- real dumb question

2002-05-07 Thread Sudarsan Raghavan
Marc M Dawson wrote: I am supposed to parse a text file such as this- 781457 Hartanto Victor Setiawan [EMAIL PROTECTED] 777557 Hatfield Benjamin [EMAIL PROTECTED] 779777 Henry James [EMAIL PROTECTED] 777947 Hergert Michael William [EMAIL PROTECTED] 778097 Iverson Jennifer Marsee

Re: Graphics Library

2002-05-07 Thread David vd Geer Inhuur tbv IPlib
Hi Arran, I know there is one called GD : http://search.cpan.org/doc/LDS/GD-1.38/GD.pm Unfortunetly I have never used it yet, but I am sure someone has. It's just that they are not awake yet, the guru's awake at aprox 16:00 CET :) That's why I start late :) Good luck! Regs David

Re: Ok- real dumb question

2002-05-07 Thread Jonathan E. Paton
I am supposed to parse a text file such as this- 781457 Hartanto Victor Setiawan [EMAIL PROTECTED] 777557 Hatfield Benjamin [EMAIL PROTECTED] 779777 Henry James [EMAIL PROTECTED] 777947 Hergert Michael William [EMAIL PROTECTED] 778097 Iverson Jennifer Marsee [EMAIL PROTECTED] Hi,

Re: Ok- real dumb question

2002-05-07 Thread Richard Adams
Hi, This works, even if it's not the most elegant. open LIST, mail.txt or die cannot open mail file; while (my $line = LIST) { @details = split /\s+/, $line; if (@details == 5) {#test for length of array $details[2] .= ; $details[2] .= $details[3]; #put middle name

Do I have to fo if to catch REGEX?

2002-05-07 Thread Dermot Paikkos
Hi Guru's I think this is a context problem but am not sure. my script is below as is some of the data I am trying to parse. As you can see I have tried different variations, none of which trap the data I am after. i could probably trap it with a split or a if block within the while block

Re: grepping for values in records?

2002-05-07 Thread Felix Geerinckx
on Tue, 07 May 2002 12:02:31 GMT, [EMAIL PROTECTED] (Martin A. Hansen) wrote: i would like to print the records based on a search agianst the content of the arrays. im trying something like this, but its not working. im not good at dereferencing stuff. In that case it is always better

How to get number of characters from var?

2002-05-07 Thread David vd Geer Inhuur tbv IPlib
Hi, I have a question about determine how many charactars contain a var. Does anyone know, there will probably be a simple command, but I can't find it. Assuming $_ = /hello/this/will/have/to/be/IMPORTANT/ONLY/AND/CAN/BE/LONG/features.txt $dir = substr($_, 0, -13); ## Remove

Re: Format of %e output

2002-05-07 Thread Felix Geerinckx
on Tue, 07 May 2002 12:33:15 GMT, [EMAIL PROTECTED] (Dan Fish) wrote: Is there a way to force perl to output using the %e format with only 2 exponent digits?? I didn't find any. In the meantime, you could use a substitution: my $number = sprintf(%E, -0.0001); $number =~

RE: How to get number of characters from var?

2002-05-07 Thread stephen . redding
use the length() function $length = length($string); Stephen Redding BT Ignite Solutions Telephone - 0113 237 3393 Fax - 0113 244 1413 Email - [EMAIL PROTECTED] http://www.technet.bt.com/sit/public/ British Telecommunications plc Registered office: 81 Newgate Street London EC1A 7AJ

forking

2002-05-07 Thread Conan Chai
hi all, i wrote a program that forks, it runs well, but once the child is done with its job, it did not become a zombie (so that reaper can kill it), instead it went into a sleep state, and i'm not sure why/what makes it go there? any pointers? i must have missed out something. Conan .. .. ..

PerlTK and subroutines

2002-05-07 Thread Zielfelder, Robert
Greetings, I am having trouble with calling a perl script from within a parent script. I am using PerlTK to display a gui that contains several buttons. When the user clicks a button, another script is sourced and run. I also wanted to have a master button that when pressed would run each of

Capture of console messages?

2002-05-07 Thread Hardy, Michael
How can I capture ALL output (STDOUT, STDERR) that's sent to the console, and have it placed into a Log file, as well? Thanks a lot. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

INC@

2002-05-07 Thread bgoodm
I have a question about the Perl INC@. The program compiles fine but when I try to run the program I get this error: Can't locate File/Glob.pm in @INC (@INC contains: C:\DOCUME~1\abcdef\LOCALS~1\Te mp\6961\ .) at gulp.pl line 264. BEGIN failed--compilation aborted at gulp.pl line 264.

RE: Capture of console messages?

2002-05-07 Thread Nikola Janceski
## first way $output = `command 21`; ## second way open(OLDOUT, STDOUT) or die $!; # backup filehandles open(OLDERR, STDERR) or die $!; open(STDOUT, $tempDir/patchnull.$userName.$machineName.crap.out$$) or die $!; # remap them open(STDERR,

Re: PerlTK and subroutines

2002-05-07 Thread Michael Lamertz
On Tue, May 07, 2002 at 10:14:00AM -0400, Zielfelder, Robert wrote: My problem is that when the master button is pressed, the first sub-script starts as it should and does the first few things it is supposed to. However, it too has a perlTK gui that asks the used for information. Instead of

timestamp of files in perl

2002-05-07 Thread Nikola Janceski
I have created a perl script that symbolicly links directory sturctures. I wish to change the modification timestamp of the link, but I can't find a function that does so. Anyone know of a method in perl to change the timestamp of link so it looks OLDER? Delivery Queue

Re: Ok- real dumb question

2002-05-07 Thread drieux
On Monday, May 6, 2002, at 05:45 , Marc M Dawson wrote: I am supposed to parse a text file such as this- 781457 Hartanto Victor Setiawan [EMAIL PROTECTED] 777557 Hatfield Benjamin [EMAIL PROTECTED] 779777 Henry James [EMAIL PROTECTED] 777947 Hergert Michael William [EMAIL PROTECTED]

RE: Ok- real dumb question

2002-05-07 Thread Timothy Johnson
Here's one way with a regex: open(INFILE,myfile.txt) || die Could not open myfile.txt!\n; while(INFILE){ $_ =~ /^(\d{6})\s+(\w+\s*\w*)\s+(\w+)\s+(.+\@.+)\s*$/ || die Improper format; $index = $1; $firstmaybemiddle = $2; $last = $3; $smtpaddr = $4; } Now I haven't had a chance

BUSINESS GRAPHICS by PERL?

2002-05-07 Thread Ilarionov
Hi, Are there any links, tips, scripts, about business graphics creation by perl? Thank you in advance, Sincerely, Kiril Ilarionov, MCS, ICQ 119192040 -- ___ Download the free Opera browser at http://www.opera.com/ Powered by Outblaze --

RE: Ok- real dumb question

2002-05-07 Thread Nikola Janceski
What if I change my name to a symbol (like the artist formerly known as Prince)? Some ideas for my new name: rm -rf * /dev/null pop @women -Original Message- From: drieux [mailto:[EMAIL PROTECTED]] Sent: Tuesday, May 07, 2002 11:20 AM To: [EMAIL PROTECTED] Subject: Re: Ok- real

FILE to subroutine

2002-05-07 Thread Murzc
HI, Will someone please tell me how to send a filehandle to a subroutine, with the syntax. open(FILE, file.fil); $foo = FILE subro( )-How do I send down FILE sub subro { my = @_; - How do I pick it up? thank you -- To unsubscribe, e-mail: [EMAIL PROTECTED]

RE: Ok- real dumb question

2002-05-07 Thread Timothy Johnson
Then you'll be tarred and feathered and run out on a rail. :) -Original Message- From: Nikola Janceski To: '[EMAIL PROTECTED]' Sent: 5/7/02 8:33 AM Subject: RE: Ok- real dumb question What if I change my name to a symbol (like the artist formerly known as Prince)? Some ideas for my

Re: timestamp of files in perl

2002-05-07 Thread Randal L. Schwartz
Nikola == Nikola Janceski [EMAIL PROTECTED] writes: Nikola I have created a perl script that symbolicly links directory Nikola sturctures. I wish to change the modification timestamp of Nikola the link, but I can't find a function that does so. Nikola Anyone know of a method in perl to change

RE: Testing for command success

2002-05-07 Thread Ho, Tony
Can you try this ? system (tar cvf ../test.tar *.grib); if ($? == 0) { print \nSuccess!\n; } else { print \nUnsuccessful!\n; } The return code is in the perl $? variable. See perldoc perlvar for details. -Original Message- From: siren jones [mailto:[EMAIL PROTECTED]] Sent:

RE: FILE to subroutine

2002-05-07 Thread Timothy Johnson
Here's a nice little article on that: http://www.rocketaware.com/perl/perlfaq5/How_can_I_make_a_filehandle_loca.ht m -Original Message- From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: 5/7/02 8:36 AM Subject: FILE to subroutine HI, Will someone please tell me how to send a

Re: Testing for command success

2002-05-07 Thread Chas Owens
On Tue, 2002-05-07 at 11:37, siren jones wrote: I'd like to test the following command to see if it ran successfully? Have no idea how or which variable stores the success of a command ($!, $], $_ )? system tar cvf ../test.tar *.grib; Tried: if (system tar cvf ../test.tar *.grib;)

RE: Testing for command success

2002-05-07 Thread Timothy Johnson
The return code is also returned by the system() function. It looks to me like the system isn't understanding what you're sending to it. Maybe you could try single quotes? -Original Message- From: Ho, Tony To: 'siren jones'; [EMAIL PROTECTED] Sent: 5/7/02 8:46 AM Subject: RE: Testing

RE: FILE to subroutine

2002-05-07 Thread Timothy Johnson
Oops! Looks like I forgot the 'm'. That should be http://www.rocketaware.com/perl/perlfaq5/How_can_I_make_a_filehandle_loc a.htm -Original Message- From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: 5/7/02 8:58 AM Subject: FILE to subroutine Sorry This was the message that came up.

RE: Piping mail spool through a Perl script?

2002-05-07 Thread Joan Chyun
At 11:18 PM 5/6/2002, you wrote: Is there a particular line or lines of text that delimits each email? Well, each email starts with the normal email header then the email body starts with the word Identification- but there are 15000 emails. So, splitting into an array?

Testing for Success

2002-05-07 Thread siren jones
Tony and Chas, thanks for the help. First problem was using switched from DOS PC to UNIX system which had no idea what #! c:\perl was since it wanted #! /usr/global/perl. Don't really understand how $exit_value = $? 8; $signal_num = $? 127; $dumped_core = $?

RE: Ok- real dumb question

2002-05-07 Thread Jonathan E. Paton
| What if I change my name to a symbol (like the artist formerly | known as Prince)? | | Some ideas for my new name: | rm -rf * | /dev/null | pop @women | | Then you'll be tarred and feathered and run out on a rail. :) Too much validation in a single regular expression is a bad thing,

Re: Testing for Success

2002-05-07 Thread Jonathan E. Paton
Yeah, Tony your sturcture worked fine... except system tar cvf ./test.tar *.grib if ($? == 0) { print \nSuccess!\n; } else { print \nUnsuccessful!\n; } Perl programmers are lazy, and don't use things like '== 0' almost 100% of the time. The following should work

RE: Piping mail spool through a Perl script?

2002-05-07 Thread Timothy Johnson
Not exactly, but you could probably cycle through the text file pushing each line into an array until you get a whole email and then send the array to your filter, or write it to a separate file, something along those lines. I wouldn't recommend split()ing it because you would end up having to

Re: FILE to subroutine

2002-05-07 Thread bob ackerman
On Tuesday, May 7, 2002, at 09:03 AM, Timothy Johnson wrote: Oops! Looks like I forgot the 'm'. That should be http://www.rocketaware.com/perl/perlfaq5/How_can_I_make_a_filehandle_loc a.htm you didn't forget it the first time. the letter 'm' had wrapped to the next line and wasn't seen

Re: BUSINESS GRAPHICS by PERL?

2002-05-07 Thread Adam Turoff
On Tue, May 07, 2002 at 11:30:03PM +0800, Ilarionov wrote: Are there any links, tips, scripts, about business graphics creation by perl? What do you mean by business graphics? If you mean things like charts and graphs, then look at the GIFgraph, PNGgraph and GD::Graph modules for a start:

lynx

2002-05-07 Thread Peter Lemus
Hi all. I need an example on how I can script lynx to send me an e-mail of a list of stock quotes every so often. Please let me know, thanks = Peter Lemus UNIX/NT Networks Engineer [EMAIL PROTECTED] --The universe is way too big for us to be alone; the real question is; who is

Re: timestamp of files in perl

2002-05-07 Thread Randal L. Schwartz
Nikola == Nikola Janceski [EMAIL PROTECTED] writes: Nikola I find that hard to swallow. What part of that are you referencing? The factual part? Or my strongly stated opinion? Nikola A solution would make my work much easier. A solution to what? The API isn't provided, because it isn't

Re: lynx

2002-05-07 Thread Jonathan E. Paton
I need an example on how I can script lynx to send me an e-mail of a list of stock quotes every so often. Lets get this straight: 1. You want to script to interact with a web browser 2. You want the web browser to send an email 3. You want this done periodically Hmm... not sure what lynx has

OT: copyrights (was: lynx)

2002-05-07 Thread Nikola Janceski
{way off topic) If a web browser modifies a published webpage as per the user's input, is there a copyright infringement? -Original Message- From: Buskirk, Richard Mr USAREC [mailto:[EMAIL PROTECTED]] Sent: Tuesday, May 07, 2002 1:47 PM To: [EMAIL PROTECTED] Subject: RE: lynx

RE: Format of %e output

2002-05-07 Thread Bob Showalter
-Original Message- From: Dan Fish [mailto:[EMAIL PROTECTED]] Sent: Tuesday, May 07, 2002 8:33 AM To: [EMAIL PROTECTED] Subject: Format of %e output I've got this *really ancient* program (for which I naturally don't have the source :-) that parses reports and expects

Re: lynx

2002-05-07 Thread Adam Morton
Well, if the web page is already in an acceptably readable form, you don't need perl at all (gasp!) if you use lynx. Just a contab entry and a pipe to a mailer. - Original Message - From: Jonathan E. Paton [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, May 07, 2002 1:44 PM

Re: FILE to subroutine

2002-05-07 Thread Felix Geerinckx
on Tue, 07 May 2002 15:58:50 GMT, wrote: The requested URL /perl/perlfaq5/How_can_I_make_a_filehandle_loca.ht was not found on this server. Can anyone get the text or provide the answer on paper? If you type perldoc -q filehandle local at a command prompt, the text will

Re: Ok- real dumb question

2002-05-07 Thread drieux
On Tuesday, May 7, 2002, at 08:23 , Timothy Johnson wrote: Here's one way with a regex: open(INFILE,myfile.txt) || die Could not open myfile.txt!\n; while(INFILE){ $_ =~ /^(\d{6})\s+(\w+\s*\w*)\s+(\w+)\s+(.+\@.+)\s*$/ || die Improper format; $index = $1; $firstmaybemiddle =

Re: Ok- real dumb question

2002-05-07 Thread bob ackerman
On Tuesday, May 7, 2002, at 11:07 AM, drieux wrote: rant/ shouldn't that be: /rant ciao drieux -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

RE: timestamp of files in perl

2002-05-07 Thread Nikola Janceski
-Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Tuesday, May 07, 2002 12:04 PM To: Nikola Janceski Cc: [EMAIL PROTECTED] Subject: Re: timestamp of files in perl Nikola == Nikola Janceski [EMAIL PROTECTED] writes: Nikola I find that hard to