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 "kron

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 yo

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 , , , ,http://rediffmail.c

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 arr

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

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 PROTEC

grepping for values in records?

2002-05-07 Thread Martin A. Hansen
hi i have a recordfile consisting of a hash of hashes of arrays. 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. so $regex is the REGEX string by which i search. $sea

Re: Ok- real dumb question

2002-05-07 Thread Richard Adams
Hi, This works, even if it's not the most elegant. open LIST, ") { @details = split /\s+/, $line; if (@details == 5) {#test for length of array $details[2] .= " "; $details[2] .= $details[3]; #put middle name in with 1st name splice @details, 3, 1; #get rid o

Format of %e output

2002-05-07 Thread Dan Fish
I've got this *really ancient* program (for which I naturally don't have the source :-) that parses reports and expects floating point numbers to be in the %e format with 2 exponent digits (I.E. 3.045E+06). I'm trying to feed it some output of my own from a perl script, but perl seems insistent

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 bu

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 bet

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 featur

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 =~ s/(E[+-]

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 Registered

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 .. .. .. d

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. D

RE: Capture of console messages?

2002-05-07 Thread Nikola Janceski
## first way $output = `command 2>&1`; ## 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, ">$tempDir/

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

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: INC@

2002-05-07 Thread Michael Lamertz
On Tue, May 07, 2002 at 07:08:22AM +, [EMAIL PROTECTED] wrote: > > 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. > > > Do you know why the INC@ does not contain

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 PR

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(){ $_ =~ /^(\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 -- T

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- rea

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 = 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 ne

Testing for command success

2002-05-07 Thread siren jones
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";) { print "\nSuccess!\n";} got: "Command not found"

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 pe

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]]

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 filehan

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.t

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

FILE to subroutine

2002-05-07 Thread Murzc
Sorry This was the message that came up. for the URL: http://www.rocketaware.com/perl/perlfaq5/How_can_I_make_a_filehandle_loca.ht Message Not Found 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 answe

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 arr

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 t

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

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 se

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 sta

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 out-ther

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

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 ha

RE: lynx

2002-05-07 Thread Buskirk, Richard Mr USAREC
You better get started building then! Richard L. Buskirk Software Developer/Web Developer -Original Message- From: Jonathan E. Paton [mailto:[EMAIL PROTECTED]] Sent: Tuesday, May 07, 2002 12:45 PM To: [EMAIL PROTECTED] Subject: Re: lynx > I need an example on how I can script lynx to

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: lyn

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 expe

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

html tag hide

2002-05-07 Thread Buskirk, Richard Mr USAREC
Well here is my problem This is part from my html Form page which i have the CGI write. How can i make it so the data.pl file does not need it to be an active tag of the html when my data.pl file requires it as such. unless($DATA_file=&pick_up("file",$query_string)){ &produce_error(

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(){ >$_ =~ /^(\d{6})\s+(\w+\s*\w*)\s+(\w+)\s+(<.+\@.+>)\s*$/ || die > "Improper > format"; >$index = $1; >$firstmaybe

Re: Ok- real dumb question

2002-05-07 Thread bob ackerman
On Tuesday, May 7, 2002, at 11:07 AM, drieux wrote: > > shouldn't that be: > 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