Re: Coprocessor while running perl 5.4 (dos version)

2003-02-21 Thread N. Ganesh Babu
Hi, perl -v the same message got printed which I have given earlier. The CPU is 386 Regards, Ganesh Jenda Krynicky wrote: From: "N. Ganesh Babu" <[EMAIL PROTECTED]> Subject:Coprocessor while running perl 5.4 (dos version) 5.4? DOS version? What exactly does perl

Re: Dynamic downloads

2003-02-21 Thread R. Joseph Newton
dan wrote: > basically, what it does, is it reads info, and supposed to output so the > user can download the data it's just output, webserver does support scripts, > it outputs > the correct data, but my goal is to be able to get the "download file" > window up, and be able to store a "servers.in

Re: Dynamic downloads

2003-02-21 Thread R. Joseph Newton
dan wrote: > I'm making a script that enables you to download content off a server as it > is, so the data is as up to date as it could ever possibly be. I have this: > > however, if I click on the link on the web page which executes the > download.pl script, it appears either a) in the web browse

Re: Dynamic downloads

2003-02-21 Thread david
Dan wrote: > > so, i click on a link which goes to download.pl, and instead of the data > the script outputs going to the browser, i want it to be saved as a file, > servers.ini, as if you've right-clicked the link and put "save target > as...". at the moment, doing "save target as..." says the f

Re: wrapping javascript around perl?

2003-02-21 Thread R. Joseph Newton
Hendricks Paul D A1C 27 IS/INYS wrote: > Hiya. > I'm doing maintenance on a perl/cgi script that vaguely resembles most of > the perl I've seen, but seems to have been written by a monkey on drugs. > The problematic line I have is this: > &Library::PrintSelectBox("flat-file-containing-opti

Re: RegExp and XML

2003-02-21 Thread R. Joseph Newton
Vincent O' Keeffe wrote: > > ... > > > So, I need to remove everything before the opening everything after the closing tag. I thought about stripping out the first 4 > and last 4 lines of the file but the messages sometimes arrive clean, and sometimes > with this extra info. Hi Vincent, Re

Re: Dynamic downloads

2003-02-21 Thread dan
ok, lemme go from the top. i have a script (below) which runs through directories retrieving necessary content, and, when the script is executed, it outputs it to browser. what i want it to do, but can't get it to do, is, to be able to click on a link which links to the script, but the user be abl

RE: Dynamic downloads

2003-02-21 Thread Dan Muey
So you're trying to figure out /can't get it to what??? Read this :: http://www.catb.org/~esr/faqs/smart-questions.html > basically, what it does, is it reads info, and supposed to > output so the user can download the data it's just output, > webserver does support scripts, it outputs the corr

Re: Dynamic downloads

2003-02-21 Thread dan
basically, what it does, is it reads info, and supposed to output so the user can download the data it's just output, webserver does support scripts, it outputs the correct data, but my goal is to be able to get the "download file" window up, and be able to store a "servers.ini" file from the data

Re: reading from a pipe

2003-02-21 Thread Michael Weber
Try something like open (PIPE, "awk '{print $1}' somefile"); and just run the perl script. -Michael >>> Bryan Harris <[EMAIL PROTECTED]> 02/21/03 02:41PM >>> I'm writing a simple script (qstat) to sum, count, and average whatever stream of numbers the user throws at it. It loops through @ARGV

RE: Dynamic downloads

2003-02-21 Thread Dan Muey
Not really sure what you're problem/goal is but if the script's code shows up in the browser or it wants to download the script, Then your webserver doesn't do .pl extensions. Try .cgi as the extension. Also make sure it's executable. If it a problem writing files try : File::Slurp If you're t

Dynamic downloads

2003-02-21 Thread dan
I'm making a script that enables you to download content off a server as it is, so the data is as up to date as it could ever possibly be. I have this: $number = 0; $path = "/home/sites/site2/users/dan/web/servers/networks/"; print "Content-type:text/plain\n\n"; print qq~; Please send detailed sug

getting text/plain from multipart

2003-02-21 Thread Dan Muey
Thanks to Casey's help I know have this working like a glove :: !/usr/bin/perl use Mail::Internet; my $mail = Mail::Internet->new(\*STDIN); my $headers = $mail->head->header_hashref; my @body = @{$mail->tidy_body()}; # Now what I'd like to do is get the text/plain part out of @body # I coul

RE: parsing email from STDIN

2003-02-21 Thread Dan Muey
Excellent! Thanks Dan > -Original Message- > From: Casey West [mailto:[EMAIL PROTECTED] > Sent: Friday, February 21, 2003 2:50 PM > To: Dan Muey > Cc: Casey West; [EMAIL PROTECTED] > Subject: Re: parsing email from STDIN > > > It was Friday, February 21, 2003 when Dan Muey took the soa

Re: reading from a pipe

2003-02-21 Thread Casey West
It was Friday, February 21, 2003 when Bryan Harris took the soap box, saying: : : I'm writing a simple script (qstat) to sum, count, and average whatever stream of numbers the user throws at it. : : It loops through @ARGV reading files, so it works fine if I say: : : qstat somefile someotherf

RE: reading from a pipe

2003-02-21 Thread Dan Muey
If you are piping then try this : @piped_in = <>; foreach $line(@piped_in) {... > -Original Message- > From: Bryan Harris [mailto:[EMAIL PROTECTED] > Sent: Friday, February 21, 2003 2:42 PM > To: [EMAIL PROTECTED] > Subject: reading from a pipe > > > > I'm writing a simple script (qs

Re: parsing email from STDIN

2003-02-21 Thread Casey West
It was Friday, February 21, 2003 when Dan Muey took the soap box, saying: : : > : > It was Friday, February 21, 2003 when Dan Muey took the soap : > box, saying: : > : Hello list, : > : : > : What is the best way to get the headers of an email into a : > hash and also the text part of the body

reading from a pipe

2003-02-21 Thread Bryan Harris
I'm writing a simple script (qstat) to sum, count, and average whatever stream of numbers the user throws at it. It loops through @ARGV reading files, so it works fine if I say: qstat somefile someotherfile However I'd like to be able to do: awk '{print $1}' somefile | qstat This doesn't

RE: parsing email from STDIN

2003-02-21 Thread Dan Muey
> > It was Friday, February 21, 2003 when Dan Muey took the soap > box, saying: > : Hello list, > : > : What is the best way to get the headers of an email into a > hash and also the text part of the body into an array or variable? > > Mail::Internet->new() accepts a list reference full of li

Re: parsing email from STDIN

2003-02-21 Thread Casey West
It was Friday, February 21, 2003 when Dan Muey took the soap box, saying: : Hello list, : : What is the best way to get the headers of an email into a hash and also the text part of the body into an array or variable? Mail::Internet->new() accepts a list reference full of lines in an email messa

RE: parsing email from STDIN

2003-02-21 Thread Dan Muey
Thanks I'll look into parsing out the message from the header boundary bit. All I'm trying to do is get some of the header fields and do different things based on them. And store the body alone somewhere. Here's what I have and it works perfecto but one question... --- use Mail::I

Re: Blacklist an array

2003-02-21 Thread Philipp Gruemmer
Hi > Just /test/ . That _must_ work! It _better_ work or I am giving up > on perl :) Sure it does! I can hardly write these lines because my head is hurting so much (I was banging my head against the table). It took me the whole #*$§&'# day to figure out that the only mistake was the double occ

RE: parsing email from STDIN

2003-02-21 Thread wiggins
On Fri, 21 Feb 2003 11:13:06 -0600, "Dan Muey" <[EMAIL PROTECTED]> wrote: > Sweet!! Thanks a million!!! > > Any ideas how to get the text/plain section of the message into an array or scalar? > This goes back to the everything in the body before

Re: pass cmdline var to this syntax s/$var/$revar/

2003-02-21 Thread Harry Putnam
Paul <[EMAIL PROTECTED]> writes: > You just needed an eval(). > This works: > > #!/dart03/users/bin/perl -wp > BEGIN { our($in,$out,$arg) = (shift,shift,shift||'') } > eval "s/$in/$out/$arg"; > > The -p means print each line after processing; it puts the input from > STDIN into $_. The BEGIN

RE: parsing email from STDIN

2003-02-21 Thread Dan Muey
Sweet!! Thanks a million!!! Any ideas how to get the text/plain section of the message into an array or scalar? > -Original Message- > From: Casey West [mailto:[EMAIL PROTECTED]] > Sent: Friday, February 21, 2003 11:13 AM > To: Dan Muey > Cc: [EMAIL PROTECTED] > Subject: Re: parsing emai

RE: Blacklist an array

2003-02-21 Thread Wagner, David --- Senior Programmer Analyst --- WGO
Philipp Gruemmer wrote: > Hello Gary, > >> [gary@gary gary]$ cat t >> #!/usr/bin/perl -w >> >> my @input=('one','two','three'); >> my @blacklist=('two','four'); >> >> foreach $line (@input) { >> foreach $cond (@blacklist) { >> print "$line=$cond..."; >> if ($line=~/$cond/) { >> pr

parsing email from STDIN

2003-02-21 Thread Dan Muey
Hello list, What is the best way to get the headers of an email into a hash and also the text part of the body into an array or variable? Here's what I have so far :: Assuming I have the entire email form stdin in the var $entmsg. # First get body use Mail::Internet; my $mail = new Mail::Inter

do{}while() [was: clarification of my() with inline if ???]

2003-02-21 Thread Paul
--- "R. Joseph Newton" <[EMAIL PROTECTED]> wrote: > Paul wrote: > > > my $i = 1; > > > do {print "$i\n"; $i++;} while $i < 1; > > > print $i . "\n"; > > > > Be aware that the above is different from > > > > my $i = 1; > > print $i++."\n" while $i < 1; > > print $i . "\n"; > > > > because a

Re: Coprocessor while running perl 5.4 (dos version)

2003-02-21 Thread Mark G
> If memory serves me ...looks like no leaks to me :O) - Original Message - From: "Jenda Krynicky" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, February 21, 2003 9:50 AM Subject: Re: Coprocessor while running perl 5.4 (dos version) > From: Mark G <[EMAIL PROTECTED]> > > > T

Re: replacing anonymous sub in embedded perl

2003-02-21 Thread andrei . voropaev
Just wanted to let you know that I've found the solution already. After playing around with it I have discovered that fix is in adding ENTER;SAVETMPS;FREETMPS;LEAVE fixes the problem. So for(i = 0; i < 1000; i++) { SV * sub; char text[256]; ENTER; SAVETMPS; sprintf(text

RE: Sendmail confusion

2003-02-21 Thread Dan Muey
Any changes to sendmail? When pipingto an external prog you now have to deal with what's going on in that prog and perhaps an error it is sending out is making perl say ' no recipients' when there is. I'd say use a module that doesn't realy on external prog. Bet that'll fix it. http://search.

RE: writting shell script to create database.

2003-02-21 Thread Dan Muey
Depends on the shell. If you don't want to use perl for this, ( I have no idea why you wouldn't ;p ) You'll need to see your specific shell's info. Otherwise I'm sure there are plenty of Us ready to assist in helping you learn how to do what you say via perl. > > > Hi, > I am sorry for put

RE: Want to get error return as text string?

2003-02-21 Thread Dan Muey
Try this :: $| = 1; open(STDERR, ">&STDOUT"); print `cp ...`; Dan > > > I want to get the error message from a system call as a text > string and not a numeric code. The error I see on the screen is: > > cp: cannot create /tmp/dev/fin/test/test.inf: Permission

RE: wrapping javascript around perl?

2003-02-21 Thread wiggins
On Fri, 21 Feb 2003 10:04:54 -0500, Hendricks Paul D A1C 27 IS/INYS <[EMAIL PROTECTED]> wrote: > Hiya. > I'm doing maintenance on a perl/cgi script that vaguely resembles most of > the perl I've seen, but seems to have been written by a monkey on

RE: Copying directory structure and its content.

2003-02-21 Thread Dan Muey
Couple of ways : 1) quick and dirty - if it's unix and you don't mind it not being portable to windows - do the -d test on the vars so you know they are directories and not evil commands to delete stuff or something if((-d $orig_dir)&&(-d $dest_dir)) { p

wrapping javascript around perl?

2003-02-21 Thread Hendricks Paul D A1C 27 IS/INYS
Hiya. I'm doing maintenance on a perl/cgi script that vaguely resembles most of the perl I've seen, but seems to have been written by a monkey on drugs. The problematic line I have is this: &Library::PrintSelectBox("flat-file-containing-options", "name-of-select-box", "default value", "arca

Re: shlock and retrying

2003-02-21 Thread Deb
Thanks, everyone. Looks like the approach is to determine how long I'm willing to wait, then count down from there. I especially like John's example of using "time". deb John W. Krahn <[EMAIL PROTECTED]> had this to say, > > Maybe something like this will work for you? > > my $start = time

Re: perlre and reading files

2003-02-21 Thread John W. Krahn
"R. Joseph Newton" wrote: > > "John W. Krahn" wrote: > > > open() returns 'true' if the file was opened or 'false' if the file was > > not opened. > > Not exactly. At least not on my Perl installation [5.6.1 on W2K]. open > returns 1 on success, but does not return a value on failure. perldoc

Re: RegExp and XML

2003-02-21 Thread John Baker
On Fri, 21 Feb 2003, John Baker wrote: > Date: Fri, 21 Feb 2003 09:37:34 -0500 (EST) > From: John Baker <[EMAIL PROTECTED]> > To: Vincent O' Keeffe <[EMAIL PROTECTED]> > Cc: [EMAIL PROTECTED] > Subject: Re: RegExp and XML > > > Here's one way: > my @woo; Hmm. That won't work. Initializing,

Re: Coprocessor while running perl 5.4 (dos version)

2003-02-21 Thread Jenda Krynicky
From: Mark G <[EMAIL PROTECTED]> > > This looks a lot like an ix86. What generation, I don't know. Lst > > time I > remember explicitly knowing that my box had a >math coprocessor, I was > running a 386. I believe the Pentium chip pulled the functionality > back into the CPU. > > > that must be

Re: Coprocessor while running perl 5.4 (dos version)

2003-02-21 Thread Mark G
> This looks a lot like an ix86. What generation, I don't know. Lst time I remember explicitly knowing that my box had a >math coprocessor, I was running a 386. I believe the Pentium chip pulled the functionality back into the CPU. > that must be exactly it. the x486 was same thing. You needed

Re: RegExp and XML

2003-02-21 Thread John Baker
Here's one way: my @woo; my $xml; foreach (@woo) { $xml .= $_, if (m/\<\?xml\s/.../\<\/Order/); } You could also set the upper and lower bounds with scalars: my $upper = '\<\?xml\s'; my $lower = '\<\/Order'; foreach (@woo) { $xml .= $_, if (m/^$upper/.../^$lower/);

RE: RegExp and XML

2003-02-21 Thread wiggins
On Fri, 21 Feb 2003 14:16:11 -, "Vincent O' Keeffe" <[EMAIL PROTECTED]> wrote: > Hi there, > > I'm downloading xml files from a mail server using POP3Client. I'm saving these >mails as files on a directory. I also parse out certain details f

Re: replacing anonymous sub in embedded perl

2003-02-21 Thread Ramprasad
[EMAIL PROTECTED] wrote: Hi! I hope this is the right list for this question. If not, please direct to appropriate one. My problem is simple. I'm embedding perl into my C program (perl 5.6.1). I noticed that when I use eval_pl in my code then my program leaks memory. So finally I reduced my prog

Re: Coprocessor while running perl 5.4 (dos version)

2003-02-21 Thread R. Joseph Newton
Jenda Krynicky wrote: > > Exiting due to signal SIGNOFP > > Coprocessor not available at eip=00019634 > > eax=000c20a0 ebx=00081240 ecx=00081240 edx=000c20a0 esi=000c5018 > > edi= ebp= esp=000c1d84 Program R:\PERL.EXE > > What are the CPUs of the machines that do this? This looks

RegExp and XML

2003-02-21 Thread Vincent O' Keeffe
Hi there, I'm downloading xml files from a mail server using POP3Client. I'm saving these mails as files on a directory. I also parse out certain details from the XML file to include in the filename. The only problem is that, when I grab the body of the message using POP3Client's method, it in

Re: Sendmail confusion

2003-02-21 Thread Ramprasad
Rob Richardson wrote: Greetings! I have a script that uses sendmail. It used to work. I didn't touch it. It doesn't work now. The log file tells me that there are no recipient addresses. It looks to me like they are. Here's the code: # Send a confirming E-mail. open (SENDMAIL, "|/usr/lib

RE: Blacklist an array

2003-02-21 Thread Beau E. Cox
Hi - > -Original Message- > From: Philipp Gruemmer [mailto:[EMAIL PROTECTED]] > Sent: Thursday, February 20, 2003 2:25 AM > To: [EMAIL PROTECTED] > Cc: Gary Stainburn > Subject: Re: Blacklist an array > > > Hello Gary, > > > [gary@gary gary]$ cat t > > #!/usr/bin/perl -w > > > > my @input=

Re: Coprocessor while running perl 5.4 (dos version)

2003-02-21 Thread Jenda Krynicky
From: "N. Ganesh Babu" <[EMAIL PROTECTED]> Subject:Coprocessor while running perl 5.4 (dos version) 5.4? DOS version? What exactly does perl -v print??? > One more problem shoot up. In some of the systems when the perl is > exuceted, I am getting error.

Re: How do you 'read' from a Tk widget ?

2003-02-21 Thread Steve Lobach
I'm a newbie, but try... my $strngName=$txtWidgetName->get(0.1, 'end'); >>> yargo <[EMAIL PROTECTED]> 02/21/03 07:14AM >>> Hi all, I have this little script that asks the user for UserName & password. I can't figure out where do I get the input. e.g. : UserName = yargo Password = q1w2e3

Re: Blacklist an array

2003-02-21 Thread Philipp Gruemmer
Hello Gary, > [gary@gary gary]$ cat t > #!/usr/bin/perl -w > > my @input=('one','two','three'); > my @blacklist=('two','four'); > > foreach $line (@input) { > foreach $cond (@blacklist) { > print "$line=$cond..."; > if ($line=~/$cond/) { > print "true\n"; > last; > } >

How do you 'read' from a Tk widget ?

2003-02-21 Thread yargo
Hi all, I have this little script that asks the user for UserName & password. I can't figure out where do I get the input. e.g. : UserName = yargo Password = q1w2e3 Please assist. TIA, #!/perl use Tk; my $vu_win = MainWindow->new(); $vu_win->configure(-title => 'Verify User'); $vu_win->geometr

Re: Blacklist an array

2003-02-21 Thread Gary Stainburn
On Thursday 20 Feb 2003 11:24 am, Philipp Gruemmer wrote: > Hello > > I'm just minutes away from bashing the famous 'head against the > monitor'. Here's my problem: > > I have an array, let's name it @input. Another array, @blacklist, > contains lines which should be matched against the @input arra

Re: Blacklist an array

2003-02-21 Thread Philipp Gruemmer
A small correction (thanks to Carlos Diaz) > Isn't shis code supposed to read the first line of the @input array then > read the first line of the @blacklist array, see if the $line contains a > $cond and then ptrint "true". After that it should carry on with the second > line from both arrays

Blacklist an array

2003-02-21 Thread Philipp Gruemmer
Hello I'm just minutes away from bashing the famous 'head against the monitor'. Here's my problem: I have an array, let's name it @input. Another array, @blacklist, contains lines which should be matched against the @input array and then do something. I tried something like: foreach $line (@

Re: clarification of my() with inline if ??? [OT]

2003-02-21 Thread Rob Dixon
R. Joseph Newton wrote: > Paul wrote: > > I guess position of the test is significant in while loops: > > #!/usr/bin/perl -w > > use strict; > use warnings; > > my $i = 1; > > do {print "$i\n"; $i++;} while $i < 1; > print $i . "\n"; The loop is always executed at least once if the modifier is 'wh

RE: miliseconds

2003-02-21 Thread Beau E. Cox
Hi - > -Original Message- > From: andres finlandes [mailto:[EMAIL PROTECTED]] > Sent: Thursday, February 20, 2003 10:39 PM > To: [EMAIL PROTECTED] > Subject: miliseconds > > Hello. > >Does anybody know how to manage miliseconds in Perl?. > > Thanks in advance. > Miguel. > Try Time

RE: miliseconds

2003-02-21 Thread NYIMI Jose (BMB)
Could you explain what are you trying to do, please ? José. > -Original Message- > From: andres finlandes [mailto:[EMAIL PROTECTED]] > Sent: Friday, February 21, 2003 9:39 AM > To: [EMAIL PROTECTED] > Subject: miliseconds > > > > > Hello. > >Does anybody know how to manage milis

RE: 'Becoming' another user

2003-02-21 Thread Beau E. Cox
Hi Joseph - > -Original Message- > From: R. Joseph Newton [mailto:[EMAIL PROTECTED]] > Sent: Thursday, February 20, 2003 8:08 PM > To: Beau E. Cox > Cc: 'Beginners > Subject: Re: 'Becoming' another user > > > "Beau E. Cox" wrote: > > > Hi - > > > > I have a script (simple server) that c

RE: writting shell script to create database.

2003-02-21 Thread yargo
perldoc DBI -Original Message- From: Pankaj Kapare [mailto:[EMAIL PROTECTED]] Sent: Saturday, February 22, 2003 12:12 AM To: [EMAIL PROTECTED] Subject: writting shell script to create database. Hi, I am sorry for putting my question on this platform.But i got stuck up at one thing.Can

miliseconds

2003-02-21 Thread andres finlandes
Hello. Does anybody know how to manage miliseconds in Perl?. Thanks in advance. Miguel. _ MSN Fotos: la forma más fácil de compartir e imprimir fotos. http://photos.msn.es/support/worldwide.aspx -- To unsubscribe, e-mail:

Re: perlre and reading files

2003-02-21 Thread LaVei
William Olbrys wrote: > > > The problem is my search and replace does not work. I'm new to perl and > I find the perlre syntax very confusing. I simply want to replace one > word(a string) with a much bigger string! How are files accessed > differently than regular strings? I don't receive an

Re: Script Works With One Newsgroup, Not With Another

2003-02-21 Thread Desmond Coughlan
Le Wed, Feb 12, 2003 at 02:14:53AM +, Desmond Coughlan a écrit ... > I post statistics to a newsgroup called news:alt.activism.death-penalty > once per week, using the 'ngstatistics' script by H. Alex LaHurreau and > Davide G. M. Salvetti. You can see the script in its entirety here ... {

writting shell script to create database.

2003-02-21 Thread Pankaj Kapare
Hi, I am sorry for putting my question on this platform.But i got stuck up at one thing.Can anybody help me? I want to write the shell script to create database and running one script file (.sql) in the same shell script which will create some tables.under newly created database. But I dont k

test mail

2003-02-21 Thread JAVEED SAR
**Disclaimer** Information contained in this E-MAIL being proprietary to Wipro Limited is 'privileged' and 'confidential' and intended for use only by the individual or entity to which it is addressed. You are notif