(I wish there was a) cpan user's guide

2004-01-06 Thread chris
I keep feeling I should learn more before I post here (lest I look like a lazy idiot who can't RTFM), but I'm getting too old to wait! Anyway, first post: Surely there's a module (or many) with a method to parse URL's down to TLD. I just can't find nice lists of them. I need to see if some files

Re: Learning Objects, destroy methods

2004-01-06 Thread Dan Anderson
I don't know if anybody has mentioned it yet, but check out weak references on CPAN: http://search.cpan.org/~lukka/WeakRef-0.01/WeakRef.pm -Dan -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: (I wish there was a) cpan user's guide

2004-01-06 Thread Dan Anderson
On Tue, 2004-01-06 at 02:10, chris wrote: I keep feeling I should learn more before I post here (lest I look like a lazy idiot who can't RTFM), but I'm getting too old to wait! http://search.cpan.org/~gaas/URI-1.29/URI.pm Search CPAN under URI instead of URL. -Dan -- To unsubscribe,

Reading/Writing Hash to Excel

2004-01-06 Thread William Martell
Hello All, Thanks to John W. Krahn and many others for their assistance in writing a script that will read a fixed length text file. I have successfully extracted the data I need and I am attempting to write the data into rows in excel. I would like to loop through the data starting

Re: Microsoft Services for UNIX/LINUX

2004-01-06 Thread William.Ampeh
Thanks for all your suggestions and comments. I finally settled with PC-ssh. This has a option for sending commands to a server ssh -l {USENAME} -i {public authentication key} {SOME UNIX SERVER} {some UNIX command}. So all I did was to create a batch file on the PC, associate this file

Re: Microsoft Services for UNIX/LINUX

2004-01-06 Thread William.Ampeh
Hello, Putty has this: Plink (a command-line interface to the PuTTY back ends) http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html Thanks to all again. I just got came across a documentation for Putty, and it provides an alternative to my original solution. And it is free!!!

RE: Microsoft Services for UNIX/LINUX

2004-01-06 Thread Akens, Anthony
Glad you've found a solution. Just thought I'd drop a note about some of the things I've had success with. We have a few scripts (originally written as shell scripts in csh) that I've converted to perl. They reside on a box running AIX 5.1. On a win2k box I've installed the Windows services

RE: taking my vbscript to perl

2004-01-06 Thread Dan Muey
Hello, now I am a newbie to perl would like to migrate my existing knowledge... Would anypone give me a crash course here... how would my following short vbscript correspond in perl. Bravo for dumping vbscript! You'll find Perl much easier, platform independent, and just generally

Re: Which is better: GTK or TK

2004-01-06 Thread Andrew Gaffney
Dan Anderson wrote: I am trying to extend my perl skills to the point of being able to create programs with GUIs. I found a tutorial to both GTK and TK -- but the TK tutorial did in one line what the GTK tutorial did in many. I was wondering what the pros and cons of TK and GTK were, and whether

Re: Reading/Writing Hash to Excel

2004-01-06 Thread wolf blaum
Hi, I have successfully extracted the data I need and I am attempting to write the data into rows in excel. well, there is wonderful (as most of them:-) CPAN Module called: Spreadsheet::WriteExcel that allows you to write in excel files, create additional worksheets and that sort of stuff.

RE: Drawing an Arc at an angle.

2004-01-06 Thread Dan Muey
Dan Muey wrote: I've made a funtion to calculate the Fresnal zone for wireless connections. What I'd like to do is generate an image based on that. Something like the example at: http://ydi.com/calculation/fresnel-zone.php However the two connected points are rarely going to

Re: Learning Objects, destroy methods

2004-01-06 Thread Gary Stainburn
On Tuesday 06 Jan 2004 2:08 pm, Dan Anderson wrote: I don't know if anybody has mentioned it yet, but check out weak references on CPAN: http://search.cpan.org/~lukka/WeakRef-0.01/WeakRef.pm -Dan Thanks Dan, Although, based on experience and responses from this thread I don't think that

RE: (I wish there was a) cpan user's guide

2004-01-06 Thread Dan Muey
I keep feeling I should learn more before I post here (lest I look like a lazy idiot who can't RTFM), but I'm getting too old to wait! Anyway, first post: Surely there's a module (or many) with a method to parse URL's down to TLD. I just can't find nice lists of them. I need to see if

What is the source of my input, file or STDIN?

2004-01-06 Thread pgregory
As I understand it, operator will open all items in @ARGV allowing one to do a shell command line of perl.script file1 file2 file3 and inside perl.script you only need while () { ... syntax to read all the files on the command line. will also open STDIN if the perl script is invoked

Re: Learning Objects, destroy methods

2004-01-06 Thread Randal L. Schwartz
Gary == Gary Stainburn [EMAIL PROTECTED] writes: Gary My idea is to keep only the %_BLOCKS as a strong ref and weaken Gary all others. That way, I can guarantee that when I delete that Gary ref the object will be destroyed. I do believe you want it the other way around. -- Randal L. Schwartz

Re: What is the source of my input, file or STDIN?

2004-01-06 Thread drieux
On Jan 6, 2004, at 9:32 AM, [EMAIL PROTECTED] wrote: [..] So, 1. from within perl.script, how can one tell if the input stream is coming from STDIN or a file that was opened by ? 2. If input stream is not coming from STDIN, but a file, how can one tell which file is the current file (assuming

Re: What is the source of my input, file or STDIN?

2004-01-06 Thread Jenda Krynicky
From: [EMAIL PROTECTED] As I understand it, operator will open all items in @ARGV allowing one to do a shell command line of perl.script file1 file2 file3 and inside perl.script you only need while () { ... syntax to read all the files on the command line. will also open

ActiveState ActivePerl 5.8 - system call

2004-01-06 Thread Atul Vohra
Hi, We have a perl/cgi script (ActivePerl 5.8) which calls a executable (C code) using the system command. Ex: . @args = (C:\\perlcode\\sample.pl, arg1, arg2); system(@args); $exit_value = $? 8; $signal_num = $? 127; $dumped_core = $? 128; print $exit_value, $signal_num, $dumped_core\n;

Re: What is the source of my input, file or STDIN?

2004-01-06 Thread William.Ampeh
So, 1. from within perl.script, how can one tell if the input stream is coming from STDIN or a file that was opened by ? Use select 2. If input stream is not coming from STDIN, but a file, how can one tell which file is the current file (assuming multiple files were specified on the command

RE: ActiveState ActivePerl 5.8 - system call

2004-01-06 Thread Dan Muey
Hi, Howdy We have a perl/cgi script (ActivePerl 5.8) which calls a executable (C code) using the system command. Ex: . @args = (C:\\perlcode\\sample.pl, arg1, arg2); system(@args); $exit_value = $? 8; $signal_num = $? 127; $dumped_core = $? 128; print $exit_value,

RE: ActiveState ActivePerl 5.8 - system call

2004-01-06 Thread Atul Vohra
Hi, I am no fan of Bill Gates either :) but the client needs to use his crap. The simplified version of code is: . $arg1=userid; $arg2=password; @args = (C:\\perlcode\\validate.exe,$arg1,$arg2); system(@args); $exit_value = $? 8; $signal_num = $? 127; $dumped_core = $? 128; print

RE: ActiveState ActivePerl 5.8 - system call

2004-01-06 Thread Bakken, Luke
$arg1=userid; $arg2=password; @args = (C:\\perlcode\\validate.exe,$arg1,$arg2); system(@args); This system() call is most likely not using the shell. $exit_value = $? 8; $signal_num = $? 127; $dumped_core = $? 128; print $exit_value, $signal_num, $dumped_core\n; .

RE: ActiveState ActivePerl 5.8 - system call

2004-01-06 Thread Dan Muey
Hi, Howdy I am no fan of Bill Gates either :) but the client needs to use his crap. The simplified version of code is: Ok, some thigns I'd do is: 1) use strict; and use warnings; if winders has them. 2) Make you variabels my() variables; (IE my $arg1 ... Instead of $arg1 ...) 3) changeg

RE: ActiveState ActivePerl 5.8 - system call

2004-01-06 Thread Atul Vohra
Hi, What did you mean by: This system() call is most likely not using the shell. validate.exe checks for arguments and prints the usage in the log file. From IIS nothing is written in the log file and this being the first thing validate.exe does . Atul On Tue, 6 Jan 2004 11:19:42 -0800,

RE: ActiveState ActivePerl 5.8 - system call

2004-01-06 Thread William.Ampeh
You see, with cgi scripting if you attempt to write to the browser without first printing Content-type: text/html\n\n You will get an error, and I thing this is what you are seeing. If your validate.exe displays any information, you need to somehow capture this, and then figure out in your

RE: ActiveState ActivePerl 5.8 - system call

2004-01-06 Thread William.Ampeh
Could you please try this: print Content-type: text/html\n\n$exit_value, $signal_num, $dumped_core\n; __ William Ampeh (x3939) Federal Reserve Board -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

RE: What is the source of my input, file or STDIN?

2004-01-06 Thread pgregory
Thanks for the help drieux. I could have been more explicit in my question to have stated that I want perl.script to exit quietly if there are no files on the command line or if not invoked as the recipient of piped output. I tested your code (I named the file test.input.source) and ... Case

RE: What is the source of my input, file or STDIN?

2004-01-06 Thread david
[EMAIL PROTECTED] wrote: Case 3. (this is the difficult case for me) the script is invoked with no file and no pipe to it. I would like the script to end quietly, such as test.input.source Instead, it waits for input. test.input.source no command line args - switching to STDIN

Re: What is the source of my input, file or STDIN?

2004-01-06 Thread Steve Grazzini
On Jan 6, 2004, at 3:17 PM, [EMAIL PROTECTED] wrote: Case 3. (this is the difficult case for me) the script is invoked with no file and no pipe to it. I would like the script to end quietly die usage() if @ARGV == 0 and -t; I didn't show you how to check for the pipe (-p) because this should

'print' output on one line

2004-01-06 Thread Esposito, Anthony
I have a perl program ( with DBI ) which prints out a line to STDOUT after every 100 database commits. I would like the 'print' to just refresh the current line every time but - not knowing how to get around it - the program instead prints a new line every 100 commits like so: INFO 3: start

RE: 'print' output on one line

2004-01-06 Thread Esposito, Anthony
Errata: The last print statement in the 'while' loop is the focus.. Tony Esposito Oracle Developer, Enterprise Business Intelligence XO Communications Plano, TX  75074 Work Phone: 972-516-5344 Work Cell: 972-670-6144 Email: [EMAIL PROTECTED] -Original Message- From: Esposito,

Re: 'print' output on one line

2004-01-06 Thread James Edward Gray II
On Jan 6, 2004, at 2:53 PM, Esposito, Anthony wrote: Is there a 'print' option/escape character the sends the file pointer ( for STDOUT in this case ) back to the beginning of the line? Sure is. Try ending your lines with a \r instead of a \n. Works on Unix at least. James -- To unsubscribe,

RE: 'print' output on one line

2004-01-06 Thread Esposito, Anthony
I tried that already but it just gives me the final count at the end. I would like the output to change - the row count, that is - as each 100 rows is committed with the final output - when the program ends - to be: INFO 3: start deleting rows. Rows deleted: 400 INFO 4: delete_rows.pl

Re: 'print' output on one line

2004-01-06 Thread Patrick Shoaf
The issue of printing to the same location is based on terminal type. You have several options on how you can implement this scenario. 1) from a text environment, you could use the codes for the proper terminal type to reposition the cursor before sending your next print statement. 2) you

RE: 'print' output on one line (thread closed)

2004-01-06 Thread Esposito, Anthony
Alright, gents, you and I were both right...\r works, as it should. It turns out that these computers today - and Perl - are even faster than I thought. My test data set was only 300 rows so by the time the program ran - and deleted - 300 rows the Perl program had only enough time to print

Re: Adding white spaces

2004-01-06 Thread Rob Dixon
Jakob Kofoed wrote: I have a file looking like (where \n is new line): blabla\n blablablablablabla\n blablablablablablablablablabla\n blabla\n but I need every line to have 80 characters - in this case filled with white space. I can figure out how to do it when I have the same

SV: Adding white spaces

2004-01-06 Thread Jakob Kofoed
Thanks Rob, I think I was a bit to much into length and substring to see the obvious! Thanks for guiding me in the right direction. Cheers, Jakob -Oprindelig meddelelse- Fra: Rob Dixon [mailto:[EMAIL PROTECTED] Sendt: 6. januar 2004 22:19 Til: [EMAIL PROTECTED] Emne: Re: Adding white

RE: ActiveState ActivePerl 5.8 - system call - RESOLVED

2004-01-06 Thread Atul Vohra
Hi, Found out that the PATH size was smaller when running from the web (IIS) compared to the command prompt. Obviously, the most important path reqd for the C code was at the end. Thanks for everyone's input. Atul -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail:

case and functions

2004-01-06 Thread DBSMITH
Yo. I read in Learning Perl that there are no such constructs like a case statement. Is there something similar or did I misread this? Also what about functions and function calls, do these exits or does the subroutines replace these? thanks Derek B. Smith OhioHealth IT UNIX / TSM /

RE: case and functions

2004-01-06 Thread Esposito, Anthony
There is no 'case' statement in Perl but it is easy to mimic such a construct. Tony Esposito Oracle Developer, Enterprise Business Intelligence XO Communications Plano, TX  75074 Work Phone: 972-516-5344 Work Cell: 972-670-6144 Email: [EMAIL PROTECTED] -Original Message- From: [EMAIL

RE: case and functions

2004-01-06 Thread Dan Muey
Yo. What's up dog? :) I read in Learning Perl that there are no such constructs like a case statement. Is there Yes, there is. Do you mean: if(this) { do this } elsif(that) { do that } else { do the other } something similar or did I misread this? Also

Re: case and functions

2004-01-06 Thread Jenda Krynicky
From: [EMAIL PROTECTED] I read in Learning Perl that there are no such constructs like a case statement. Is there something similar or did I misread this? Ask the FAQ, run perldoc -q case statement Also what about functions and function calls, do these exits or does the

Re: What is the source of my input, file or STDIN?

2004-01-06 Thread R. Joseph Newton
[EMAIL PROTECTED] wrote: So, 1. from within perl.script, how can one tell if the input stream is coming from STDIN or a file that was opened by ? Use select 2. If input stream is not coming from STDIN, but a file, how can one tell which file is the current file (assuming multiple files

Re: case and functions

2004-01-06 Thread Chuck Fox
[EMAIL PROTECTED] wrote: From: [EMAIL PROTECTED] I read in Learning Perl that there are no such constructs like a case statement. Is there something similar or did I misread this? Ask the FAQ, run perldoc -q case statement Also what about functions and function calls, do

Re: What is the source of my input, file or STDIN?

2004-01-06 Thread R. Joseph Newton
[EMAIL PROTECTED] wrote: Thanks for the help drieux. I could have been more explicit in my question to have stated that I want perl.script to exit quietly if there are no files on the command line or if not invoked as the recipient of piped output. So what have you tried to adjust the code

Re: case and functions

2004-01-06 Thread DBSMITH
People of the Perl, thanks for the infoI am familiar with perls subroutines so I will use these and this name instead of functions. Also, my intention was to avoid the if , then ,elif, then constructs, mentioned by Dan, for certain situations which is why I asked about cases so I will

killing processes after x seconds

2004-01-06 Thread Dan Anderson
Is it possible to (easily) tell perl to kill itself and all children if the script doesn't execute in x seconds? I thought about forking the script and having the parent sleep for x seconds at the top of the process, but that seems like a lot of extra code. I was hoping there

Re: ActiveState ActivePerl 5.8 - system call

2004-01-06 Thread R. Joseph Newton
Dan Muey wrote: Also IIS is, with all due respect and apologies for being OT, crap. Not the case, Dan. While I would never expose IIS to the public Internet, it is an excellent tool for debugging CGI scripts. It puts a minimum of extraneous configuration grief into the process, and usually

RE: ActiveState ActivePerl 5.8 - system call

2004-01-06 Thread Dan Muey
Dan Muey wrote: Also IIS is, with all due respect and apologies for being OT, crap. Not the case, Dan. While I would never expose IIS to the public Internet, it is an excellent tool for debugging CGI scripts. It puts a minimum of extraneous configuration grief into the process,

Re: ActiveState ActivePerl 5.8 - system call

2004-01-06 Thread R. Joseph Newton
Dan Muey wrote: $exit_value = $? 8; bit 8 [0 bit on high byte] $signal_num = $? 127; value of 7 lowest bits $dumped_core = $? 128;bit 7 [highest bit of low byte] Just curious, what is happening here with the and the . I see there's a 128 there, perhaps

Re: ActiveState ActivePerl 5.8 - system call

2004-01-06 Thread R. Joseph Newton
[EMAIL PROTECTED] wrote: You see, with cgi scripting if you attempt to write to the browser without first printing Content-type: text/html\n\n You will get an error, and I thing this is what you are seeing. Actually, at least on my installation, IIS will return error messages to the browser

Re: 'print' output on one line

2004-01-06 Thread R. Joseph Newton
Esposito, Anthony wrote: I tried that already but it just gives me the final count at the end. I would like the output to change - the row count, that is - as each 100 rows is committed with the final output - when the program ends - to be: Try turning autoflush on: Greetings! C:\perl -w

How to parse Microsoft Outlook Inbox

2004-01-06 Thread PerlDiscuss - Perl Newsgroups and mailing lists
Hi, I am trying to write a script that will parse Microsoft outlook Inbox to a .txt file. Please let me know if there a way to do that. Thanks in advance for your help. Ron -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

RE: Microsoft Services for UNIX/LINUX

2004-01-06 Thread Ichim, Adrian N.
What I would like to do is to enable users to simply map UNIX-based drives on which their applications reside, and then click on selected applications (since most of them are used to the Microsoft point-and-click or Run tool). I was wondering if anyone on this list have had any luck

RE: 'print' output on one line

2004-01-06 Thread Esposito, Anthony
Very helpful...thank you Tony Esposito Oracle Developer, Enterprise Business Intelligence XO Communications Plano, TX  75074 Work Phone: 972-516-5344 Work Cell: 972-670-6144 Email: [EMAIL PROTECTED] -Original Message- From: R. Joseph Newton [mailto:[EMAIL PROTECTED] Sent: Tuesday,

Re: case and functions

2004-01-06 Thread Randal L. Schwartz
DBSMITH == DBSMITH [EMAIL PROTECTED] writes: DBSMITH Also, my intention was to avoid the if , then ,elif, then DBSMITH constructs, mentioned by Dan, for certain situations What is the source of your fear? Sounds like a phobia to me. -- Randal L. Schwartz - Stonehenge Consulting Services,

Re: case and functions

2004-01-06 Thread R. Joseph Newton
[EMAIL PROTECTED] wrote: People of the Perl, thanks for the infoI am familiar with perls subroutines so I will use these and this name instead of functions. Also, my intention was to avoid the if , then ,elif, then constructs, mentioned by Dan, for certain situations which is why I

Perl equivalent of Ruby/DL?

2004-01-06 Thread David Garamond
Ruby/DL is a Ruby module that enables one to load a .DLL/.so and start using exported functions available in the DLL. It's a nice alternative of using an external library without messing with XS or writing real C files. Ruby/DL has been included in the standard Ruby distribution since 1.8.