Loading Modules

2003-12-22 Thread Support
Hi All I have a perl module I want to use in a perl script and make available by the  ' use mymodule.pm'  call. Plus I would like to place it the same directory as the main script. The main script runs fine until I make a call to the module. I then then I get a ' subroutine not defined ' What am

Re: Win32 Registry

2003-12-22 Thread Bob X
$reg_obj->DeleteKey($sub_key_name); -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Perl module installation problem

2003-12-22 Thread PerlDiscuss - Perl Newsgroups and mailing lists
Dear Sir/Madam, I am just wondering if anyone can help with this: When I try to install the module, XML::Parser::PerlSAX, I encountered the following error message: Running make test PERL_DL_NONLAZY=1 /usr/bin/perl5.8.1 "-MExtUtils::Command::MM" "-e" "test_harness(0, 'bli

Re: Align Text

2003-12-22 Thread Bill Jastram
James: Thanks for the sample and I agree it does work. How can I create an array of just the first names for a file? This is what I have so far: __ open (A, "testing.txt"); @A = ; foreach ($n = 0; $n<10; $n++) { #Split each record into its fie

Re: Calling another perl file

2003-12-22 Thread Tushar Gokhale
Thanks a lot for instant reply. Your prompt help has helped me a lot, my problem has resolved. It helped me to understand your example cleanly. Thanks again, -Tushar -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Loading Modules

2003-12-22 Thread Owen
On Mon, 22 Dec 2003 22:06:33 +1300 Support <[EMAIL PROTECTED]> wrote: > I then then I get > a ' subroutine not defined ' > What am I doing wrong. Probably not defining a sub routine. If your script is not too big, why not post it, and maybe we can help you find the error of your ways --

Re: How to write a page break character.- one more question

2003-12-22 Thread John W. Krahn
Chetak Sasalu wrote: > > Chetak Sasalu wrote: > > > > I want to search for the word "status" in a group of files in a > > directory and replace it with "status\n^L" where ^L is a page break > > chatacter, In vi I can type it in using cntrl+l. > > > > I want to do this by > > > > perl -p -i.old -e

Re: How to write a page break character.- one more question

2003-12-22 Thread Rob Dixon
Chetak Sasalu wrote: > > From: John W. Krahn [mailto:[EMAIL PROTECTED] > Sent: Saturday, December 20, 2003 3:33 PM > To: [EMAIL PROTECTED] > Subject: Re: How to write a page break character. > > > > Chetak Sasalu wrote: > > > > > > Hi, > > > > Hello, > > > > > I want to search for the word "status"

Running command from string variable as if part of script

2003-12-22 Thread Tushar Gokhale
I'm reading another perl script into array and want to commands from the the array as if normal perl commands. How do I do it? -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

RE: Running command from string variable as if part of script

2003-12-22 Thread NYIMI Jose (BMB)
I'm wondering if you really need to read a script into an array ? Ugly for me ;) José. -Original Message- From: Tushar Gokhale [mailto:[EMAIL PROTECTED] Sent: Monday, December 22, 2003 1:36 PM To: [EMAIL PROTECTED] Subject: Running command from string variable as if part of script I'm

RE: How to write a page break character.- one more question

2003-12-22 Thread Daniel Staal
--As off Monday, December 22, 2003 9:15 AM +0530, [EMAIL PROTECTED] is alleged to have said: I have one more requirement, The last STATUS which occurs just prior to the file end should not be followed by a page break character. How can I code this in perl? --As for the rest, it is mine. Just to

RE: Loading Modules

2003-12-22 Thread Dan Muey
Doe your m > Hi All > I have a perl module I want to use in a perl script and make available by the ' use > mymodule.pm' call. > Plus I would like to place it the same directory as the main script. The main script > runs fine until I > make a call to the module. I then then I get a ' subrout

Need disclaimer

2003-12-22 Thread Schneider, Jim
This isn't about coding, but it is about perl. I have just learned perl scripting ("Learning Perl") and have written a pair of perl scripts to interface with a scheduling package. I have had requests for the scripts from the scheduling package user group, but my company says I have to include a d

Dinesh Kumar/NCE/AMADEUS is out of the office.

2003-12-22 Thread Dinesh Kumar
I will be out of the office starting 22/12/2003 and will not return until 19/01/2004. I am on vacation and will respond to your message when I return. For all urgent matters please contact Fabien FELIX. Thanks -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [

Re: Need disclaimer

2003-12-22 Thread Wiggins d Anconia
> This isn't about coding, but it is about perl. I have just learned perl > scripting ("Learning Perl") and have written a pair of perl scripts to > interface with a scheduling package. I have had requests for the scripts > from the scheduling package user group, but my company says I have to >

Re: Need disclaimer

2003-12-22 Thread Paul Johnson
On Mon, Dec 22, 2003 at 09:03:56AM -0600, Schneider, Jim wrote: > This isn't about coding, but it is about perl. I have just learned perl > scripting ("Learning Perl") and have written a pair of perl scripts to > interface with a scheduling package. I have had requests for the scripts > from the

RE: Need disclaimer

2003-12-22 Thread Schneider, Jim
Perfect! Thank you! The 'expat' license is exactly what I was looking for. And thank you for the quick response. Jim "Victim of the centrifugal force of the learning curve" -Original Message- From: Wiggins d Anconia [mailto:[EMAIL PROTECTED] Sent: Monday, December 22, 2003 9:14 AM To: S

How to reconfigure MCPAN ?

2003-12-22 Thread BERTHOLD Jean
Hello, I have a problem with Cpan module: At the first running of Perl installation, I received the following prompt: "Are you ready for manual configuration? [yes] " Everything step of install except I put a wrong response at: Parameters for the 'perl Makefile.PL' command? Typical frequently u

Re: How to reconfigure MCPAN ?

2003-12-22 Thread Wiggins d Anconia
> Hello, > > I have a problem with Cpan module: > At the first running of Perl installation, I received the following prompt: > > "Are you ready for manual configuration? [yes] " > > Everything step of install except I put a wrong response at: > > Parameters for the 'perl Makefile.PL' command

Re: generating GIFs

2003-12-22 Thread Andrew Gaffney
Christian Bolstad wrote: On Sun, 21 Dec 2003, Andrew Gaffney wrote: I think I've fixed this, too. It looks like it was some weird caching issue with Apache and mod_perl. I renamed the script and it works correctly every time now. Thank you for the suggestion to use stringTTF() or stringFT() to gen

RE: generating GIFs

2003-12-22 Thread Dan Muey
> Christian Bolstad wrote: > > On Sun, 21 Dec 2003, Andrew Gaffney wrote: > > > >>I think I've fixed this, too. It looks like it was some > weird caching > >>issue with Apache and mod_perl. I renamed the script and it works > >>correctly every time now. Thank you for the suggestion to use > >>

Re: generating GIFs

2003-12-22 Thread Andrew Gaffney
Dan Muey wrote: Christian Bolstad wrote: On Sun, 21 Dec 2003, Andrew Gaffney wrote: I think I've fixed this, too. It looks like it was some weird caching issue with Apache and mod_perl. I renamed the script and it works correctly every time now. Thank you for the suggestion to use stringTTF

Re: Loading Modules

2003-12-22 Thread drieux
On Dec 22, 2003, at 1:06 AM, Support wrote: Hi All I have a perl module I want to use in a perl script and make available by the  ' use mymodule.pm'  call. I'll presume you meant use mymodule; # don't need the *.pm Plus I would like to place it the same directory as the main script. The main sc

Newbie trying to cleanup/format text file

2003-12-22 Thread stuart_clemons
Hi all: I'm trying to cleanup and format this text file of user names, so that I have one column of user names. Here's the text file: The request will be processed at a domain controller for domain FOOBAR. Group name Misc CommentThese are the FOOBAR users Members ---

Read Fix Length Text, Loop Problems

2003-12-22 Thread William Martell
Hello All, Thanks for reading my email. I am trying to read a fix length text file and extract specific substrings from each line. I would like to extract specific things depending on which line is being read so I can avoid picking up trash reading every line. The pattern repeats itself over and

Re: Running command from string variable as if part of script

2003-12-22 Thread drieux
On Dec 22, 2003, at 5:05 AM, NYIMI Jose (BMB) wrote: [..] I'm wondering if you really need to read a script into an array ? Ugly for me ;) [..] I agree with you, it is clearly not making sense why one would want that as a pattern - it clearly can be done: my $username = 'drieux'; m

Weekly list FAQ posting

2003-12-22 Thread casey
NAME beginners-faq - FAQ for the beginners mailing list 1 - Administriva 1.1 - I'm not subscribed - how do I subscribe? Send mail to <[EMAIL PROTECTED]> You can also specify your subscription email address by sending email to (assuming [EMAIL PROTECTED] is your email address):

Re: Running command from string variable as if part of script

2003-12-22 Thread Ajey
my @lines = `cat <2nd_script>`; for each my $line (@lines) { do something; } I guess this should work.I'm presuming that,"normal perl commands' means, each perl stmt in the script. correct me incaes i'm wrong. On Mon, 22 Dec 2003, Tushar Gokhale wrote: > I'm reading another perl script

Fw: Newbie trying to cleanup/format text file

2003-12-22 Thread William Martell
- Original Message - From: "William Martell" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, December 22, 2003 11:19 AM Subject: Re: Newbie trying to cleanup/format text file > Hi Stuart, > > This is as far as I could take it: Any critiques or suggestions on my code > would be

RE: Running command from string variable as if part of script

2003-12-22 Thread Bob Showalter
Tushar Gokhale wrote: > I'm reading another perl script into array and want to commands from > the the array as if normal perl commands. How do I do it? If you want to execute the perl commands in the other script, don't read them into an array; just do() the script: do './myscript.pl'; perld

Re: Simple string API question

2003-12-22 Thread david
Matthew Glidden wrote: > Just started working on scripts and wanted to compare strings yesterday, > but using strEQ (or strcmp) gets me an undefined method error. What > library should I "use" in my script to get those API? Couldn't find the > answer in any on-line tutorials. strEQ is a C API for

RE: How to reconfigure MCPAN ?

2003-12-22 Thread BERTHOLD Jean
thanks for your help, your 'o conf init' parameter is working but how to specify the following parameter: Your choice: [ ] Parameters for the 'make' command? Typical frequently used setting: -j3 dual processor system Your choice: [-j 3] If I leave the field blank the '-j3

Re: Newbie trying to cleanup/format text file

2003-12-22 Thread John W. Krahn
Stuart Clemons wrote: > > Hi all: Hello, > I'm trying to cleanup and format this text file of user names, so that I > have one column of user names. Here's the text file: > > The request will be processed at a domain controller for domain FOOBAR. > > Group name Misc > CommentThes

Win32::OLE, Read Fix Length Text, Loop Problems

2003-12-22 Thread William Martell
- Original Message - From: "William Martell" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Monday, December 22, 2003 10:26 AM Subject: Read Fix Length Text, Loop Problems > Hello All, > > Thanks for reading my email. I am trying to read a fix length text file an

re: Newbie trying to cleanup/format text file

2003-12-22 Thread stuart_clemons
I kept working at it and was finally able to get rid of the unwanted lines in the text file using a series of nested if's. It's certainly not elegant, but it works ! Surely there's a more efficient way to get rid of the unwanted lines. Anyway, here's what I came up with for now. This leaves

printf

2003-12-22 Thread Perl
Could anybody please tell me what the following piece of code does : $number = 59.4567312 ; printf (" %9.2g", $number); i know what " %9.1f" would have done in this case. but how does " %9.2g" round off ? thanks, S. __ Do you Yahoo!? New Yahoo! Photos - easier

How to catch kill signal in PERL

2003-12-22 Thread Titu Kim
Hi, I am writing a simple perl script that will catch kill signal. I am able to catch the signal sent within the script. However, if I kill the process in a shell using "kill -9 PID", the handler does not catch it. Can someone help me? Here is my code snippet. ==Handler ===

Re: Newbie trying to cleanup/format text file

2003-12-22 Thread John W. Krahn
"John W. Krahn" wrote: > > open FH, 'c:/foobar.txt' or die "sourcefile open failed - $!"; > while ( ) { > next if 1 .. /^-+$/; > next if /^The command completed successfully/ .. eof( FH ); > print "$_\n" for /\S+/g; > } Or better: :-) open FH, 'c:/foobar.txt' or die "sourcefile op

Re: printf

2003-12-22 Thread wolf blaum
Am Montag, 22. Dezember 2003 20:17 schrieb Perl: > i know what " %9.1f" would have done in this case. > but how does " %9.2g" round off ? the FORMAT notation used by prinf, sprintf, ... can be found on http://www.perldoc.com/perl5.8.0/pod/func/sprintf.html which gives: %e  a floating-point

RE: How to catch kill signal in PERL

2003-12-22 Thread Bob Showalter
Titu Kim wrote: > Hi, >I am writing a simple perl script that will catch > kill signal. I am able to catch the signal sent within > the script. However, if I kill the process in a shell > using "kill -9 PID", the handler does not catch it. > Can someone help me? Here is my code snippet. > > ==

Re: printf

2003-12-22 Thread wolf blaum
Am Montag, 22. Dezember 2003 20:17 schrieb Perl: > i know what " %9.1f" would have done in this case. > but how does " %9.2g" round off ? the FORMAT notation used by prinf, sprintf, ... can be found on http://www.perldoc.com/perl5.8.0/pod/func/sprintf.html which gives: %e a floating-point

RE: Loading Modules

2003-12-22 Thread Dan Muey
Please post to the list so we can all share. > At 08:53 a.m. 22/12/2003 -0600, you wrote: > > >Doe your m > > > > > Hi All > > > I have a perl module I want to use in a perl script and make > > > available > > by the ' use mymodule.pm' call. > > > Plus I would like to place it the same direct

Fw: Newbie trying to cleanup/format text file

2003-12-22 Thread William Martell
- Original Message - From: "William Martell" <[EMAIL PROTECTED]> To: "William Martell" <[EMAIL PROTECTED]> Sent: Monday, December 22, 2003 1:58 PM Subject: Re: Newbie trying to cleanup/format text file > Hi Stuart, > > I modified some of the code and it works better now. I now have an a

Re: Running command from string variable as if part of script

2003-12-22 Thread drieux
On Dec 23, 2003, at 1:03 AM, Ajey wrote: [..] my @lines = `cat <2nd_script>`; for each my $line (@lines) { do something; } I guess this should work.I'm presuming that,"normal perl commands' means, each perl stmt in the script. correct me incaes i'm wrong. [..] thanks for the Thump On the head![1

Re: Newbie trying to cleanup/format text file

2003-12-22 Thread William Martell
OK... Sorry for the multiple reports. I modified the script again to get rid of the blank elements in the array. You should now have the array 'data' which holds the name of the members without any trailing or leading whitespaces. Take Care, William - Original Message - From: "William

Re: Read Fix Length Text, Loop Problems

2003-12-22 Thread John W. Krahn
William Martell wrote: > > Hello All, Hello, > Thanks for reading my email. I am trying to read a fix length text file and > extract specific substrings from each line. I would like to extract > specific things depending on which line is being read so I can avoid picking > up trash reading eve

Re: Loading Modules

2003-12-22 Thread Support
At 08:15 a.m. 22/12/2003 -0800, you wrote: On Dec 22, 2003, at 1:06 AM, Support wrote: Hi All I have a perl module I want to use in a perl script and make available by the  ' use mymodule.pm'  call. I'll presume you meant use mymodule; # don't need the *.pm Yes Plus I would like to plac

Loading Modules - More

2003-12-22 Thread Support
Thanks to all those who have replied Just to update This is the module call: use Pcalc qw(Delta_Days Add_Delta_Days Date_to_Days leap_year check_date); this is the sub call: $startdate = Date_to_Days($tyear,$tmonth,$tday); this is the error: Undefined subroutine &main::Date_to_Days called at newc

Re: printf

2003-12-22 Thread Steve Grazzini
On Mon, Dec 22, 2003 at 11:17:03AM -0800, Perl wrote: > i know what " %9.1f" would have done in this case. > but how does " %9.2g" round off ? The *rounding* works like "%f", but there are some other differences. a) the precision (".2") applies to significant digits, not digits after the d

RE: Loading Modules - More

2003-12-22 Thread Dan Muey
> This is the module call: > use Pcalc qw(Delta_Days Add_Delta_Days Date_to_Days leap_year check_date); > this is the sub call: > $startdate = Date_to_Days($tyear,$tmonth,$tday); > this is the error: use strict; use warnings; Always always while developing a script and afterward unless oyu have

Re: Read Fix Length Text, Loop Problems

2003-12-22 Thread William Martell
Thanks very much for your help John. - Original Message - From: "John W. Krahn" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, December 22, 2003 2:28 PM Subject: Re: Read Fix Length Text, Loop Problems > William Martell wrote: > > > > Hello All, > > Hello, > > > Thanks for

Installing Modules From CPAN

2003-12-22 Thread Joe Echavarria
Hi there, I need to install the modules in order to work with mysql database. I have red hat 9 and have already installed the Mysql database. How can i install the all the modules i need from cpan using my red hat command line ? Which modules i need ?, How i install each module ? Thanks. _

Re: Loading Modules

2003-12-22 Thread Owen
On Tue, 23 Dec 2003 08:50:27 +1300 Support <[EMAIL PROTECTED]> wrote: > The module is Pcalc.pm from CPAN. My website host does not have it in their > server and suggested I place it in the same directory as my original script > and just call it from there ??. I take then I do not have to go thro

RE: Installing Modules From CPAN

2003-12-22 Thread Dan Muey
> > Hi there, Howdy. > > I need to install the modules in order to work with > mysql database. I have red hat 9 and have already > installed the Mysql database. How can i install the > all the modules i need from cpan using my red hat > command line ? Which modules i need ?, How i install

Re: Installing Modules From CPAN

2003-12-22 Thread Wiggins d Anconia
> Hi there, > > I need to install the modules in order to work with > mysql database. I have red hat 9 and have already > installed the Mysql database. How can i install the > all the modules i need from cpan using my red hat > command line ? Which modules i need ?, How i install > each modu

Re: Loading Modules - More

2003-12-22 Thread Owen
On Tue, 23 Dec 2003 09:53:09 +1300 Support <[EMAIL PROTECTED]> wrote: > use Pcalc qw(Delta_Days Add_Delta_Days Date_to_Days leap_year check_date); See my previous message, you need to make a a directory "Date" in your working directory and place Pcalc in there use Date::Pcalc qw(Delta_Days Ad

RE: Loading Modules - More

2003-12-22 Thread Support
Thanks Dan I've read the Exporter docs and the module seems to be OK there. I'm pretty sure everything is OK with the module and the export/import functions. Using 'strict' and 'warnings' is telling me: 'Use of uninitialized value in length at newcaldb.cgi line 165' and I still sub error when I

Re: Loading Modules

2003-12-22 Thread drieux
On Dec 22, 2003, at 12:43 PM, Support wrote: [..] This is part of the module require Exporter; @ISA = qw(Exporter); @EXPORT = qw(); @EXPORT_OK = qw(     Days_in_Year     Days_in_Month     Weeks_in_Year...etc [..] well, there you have it. by default you are not exporting any function

Re: Loading Modules - More

2003-12-22 Thread drieux
On Dec 22, 2003, at 12:53 PM, Support wrote: Thanks to all those who have replied Just to update This is the module call: use Pcalc qw(Delta_Days Add_Delta_Days Date_to_Days leap_year check_date); this is the sub call: $startdate = Date_to_Days($tyear,$tmonth,$tday); this is the error: Undefined

Re: Loading Modules - More

2003-12-22 Thread drieux
On Dec 22, 2003, at 1:51 PM, Owen wrote: On Tue, 23 Dec 2003 09:53:09 +1300 Support <[EMAIL PROTECTED]> wrote: use Pcalc qw(Delta_Days Add_Delta_Days Date_to_Days leap_year check_date); See my previous message, you need to make a a directory "Date" in your working directory and place Pcalc in the

Re: Loading Modules - Yipee!!

2003-12-22 Thread Support
Owen. If you were standing next to me I'd give you a big kiss (no I'm not really like that, just a figure of speech) It worked, how, why I'm still not sure. I did put the module into a subdirectory and called it Date and used the following. use Date::Pcalc qw(Delta_Days Add_Delta_Days Date_to_D

Re: Align Text

2003-12-22 Thread James Edward Gray II
On Dec 21, 2003, at 10:47 PM, Bill Jastram wrote: James: Thanks for the sample and I agree it does work. How can I create an array of just the first names for a file? This is what I have so far: Let's take a look at what you have first. You're missing two very important lines right here: use

Re: Running command from string variable as if part of script

2003-12-22 Thread R. Joseph Newton
Tushar Gokhale wrote: > I'm reading another perl script into array and want to commands from the the > array as if normal perl commands. How do I do it? The truly helpful answer would be: "Don't do this!". OTOH, if you want to try it out for yourself, I would suggest wrapping in in an eval bloc

Re: generating GIFs

2003-12-22 Thread R. Joseph Newton
Dan Muey wrote: > Just curiouse as to why you'd want to replace a png with a gif? > Why no just keep the png and ditch the gif, whats their faces want > to charge you for using gif format anyway. Wants to mebbe, but they's SOL in the good ol' Yew Ess of Aye. There patent dun expirated back in Jo

Opening two files at once

2003-12-22 Thread denis
I have two text files I would like to open and read at the same time. Whats the best way to do this? I was think along these lines: open (TESTFILE, <"somefile.txt")|| die "can not open file"; open (LOGFILE, <"my_other_file")|| die "can not open other file"; while (($line1 = ) & ($line2 = ))

RE: Opening two files at once

2003-12-22 Thread Charles K. Clarkson
[EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: : : I have two text files I would like to open and read at the : same time. Whats the best way to do this? : : I was think along these lines: : : open (TESTFILE, "http://learn.perl.org/>

Re: Opening two files at once

2003-12-22 Thread drieux
On Dec 22, 2003, at 4:32 PM, [EMAIL PROTECTED] wrote: I have two text files I would like to open and read at the same time. Whats the best way to do this? the only problem with your current form, barring the faux paux of while( ($line1 = ) && ($line2 = )) { } is what to do with t

Re: debugger

2003-12-22 Thread Jeff Westman
zentara <[EMAIL PROTECTED]> wrote: > On 19 Dec 2003 09:16:10 -0700, [EMAIL PROTECTED] (Eric Walker) wrote: > > >Hello all, > >When using the perl debugger, is there a way to load in the breakpoints > >and watch variables that I want from a file. I am using it now and as I > >am debugging I am fi

Re: Running command from string variable as if part of script

2003-12-22 Thread R. Joseph Newton
"R. Joseph Newton" wrote: > Tushar Gokhale wrote: > > > I'm reading another perl script into array and want to commands from the the > > array as if normal perl commands. How do I do it? > > The truly helpful answer would be: "Don't do this!". OTOH, if you want to try > it out for yourself, I wo

Re: Newbie trying to cleanup/format text file

2003-12-22 Thread R. Joseph Newton
[EMAIL PROTECTED] wrote: > I kept working at it and was finally able to get rid of the unwanted lines > in the text file using a series of nested if's. It's certainly not > elegant, but it works ! > > Surely there's a more efficient way to get rid of the unwanted lines. Definitely! > > > Anywa

RE: How to write a page break character.- one more question

2003-12-22 Thread chetak.sasalu
Daniel, You hit the STATUS on its head What follows after the status, is another test case starting with the following line. STATUS: ^L 4.1 (-) madmad: Testing reliable nuts. I did it my way...the morons way, I chucked the file into a scalar variable, reset the $RS ($\) so that $ in the re