Re: forming quadrilateral from points

2003-06-09 Thread R. Joseph Newton
"N, Guruguhan (GEAE, JV, EACoE-India)" wrote: > Hi All, >I am new to this group and recently started using Perl. I would like to > know whether it is possible to fit a quadrilateral if four points are known in 3-D > space ? That is not a Perl question. It is a question about geomet

Re: perl extensions

2003-06-09 Thread R. Joseph Newton
Jenda Krynicky wrote: > > > > "fyi > > > > .pl used to be used for both executables and libraries. > > > > A library is simply perl code located in a different file > > > > which is imported into another perl program with the 'require' > > > > keyword. > > > > > > > > Now t

replacing text in a file

2003-06-09 Thread christopher j bottaro
hello, what is the easiest way to replace text in a file? say i have file blah.txt and i want to replace some regular expression found in that file with something. also, i want to do this from within the perl program, not by invoking perl with the -e option. thanks, -- christopher -- To uns

Re: how to count?

2003-06-09 Thread Tassilo von Parseval
On Sun, Jun 08, 2003 at 11:41:26PM -0500 Jerry Preston wrote: > I am not sure if this can be done or not, but I want to create a counter on > the fly so to speak. > > foreach $id ( @IDS ) { > $cnt = "$id"."_cnt"; > $cnt++; > } > > All I get is "item_cnt". Is there a way

Re: replacing text in a file

2003-06-09 Thread Tassilo von Parseval
On Mon, Jun 09, 2003 at 02:46:48AM -0500 christopher j bottaro wrote: > what is the easiest way to replace text in a file? say i have file blah.txt > and i want to replace some regular expression found in that file with > something. also, i want to do this from within the perl program, not by

SQL vs MySql?

2003-06-09 Thread SNAG
Hi All, How compatible is MySQL to MSSql? If I have a MSSql database and relevant queries, etc., will I be able to use MySQL to access these? Thanx SNAG

replacing parts of a string

2003-06-09 Thread christopher j bottaro
hello, i want to do something like: $line =~ s/M (\d+) (\d+)/M $1+100 $2+200/; obviously adding 100 to $1 and 200 to $2, not adding the text '+100' and '+200'. thanks for the help, -- christopher -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: perl extensions

2003-06-09 Thread Jenda Krynicky
From: "R. Joseph Newton" <[EMAIL PROTECTED]> > Jenda Krynicky wrote: > > No. The original distinction between *.pl and *.plx was the > > interpreter used for CGIs. > > The *.pl was interpreted by perl.exe, while *.plx was interpreted by > > perlIS.dll (In-process Perl interpreter for MS IIS). > >

Re: replacing parts of a string

2003-06-09 Thread Jenda Krynicky
From: christopher j bottaro <[EMAIL PROTECTED]> > hello, > i want to do something like: > $line =~ s/M (\d+) (\d+)/M $1+100 $2+200/; > obviously adding 100 to $1 and 200 to $2, not adding the text '+100' > and '+200'. $line =~ s/M (\d+) (\d+)/'M ' . ($1+100) . ' ' . ($2+200)/e; Read perld

Re: replacing parts of a string

2003-06-09 Thread Tassilo von Parseval
On Mon, Jun 09, 2003 at 04:53:53AM -0500 christopher j bottaro wrote: > i want to do something like: > $line =~ s/M (\d+) (\d+)/M $1+100 $2+200/; > obviously adding 100 to $1 and 200 to $2, not adding the text '+100' and > '+200'. Use the /e modifier and turn the substitution side into a valid P

Re: Why "Can't locate auto/Heap/add.al"?

2003-06-09 Thread Janek Schleicher
Ying Liu wrote at Thu, 05 Jun 2003 20:20:02 -0500: > I finally install the Heap module. But I run the example of the CPAN: > foreach $i ( 1..100 ) >{ >$elem = NumElem($i); >$heap->add($elem); >} >} > It told me: > Can't locate auto/Heap/add.al in @INC > > I search thi

Re: typing files quickly

2003-06-09 Thread Janek Schleicher
Harry Putnam wrote at Sat, 07 Jun 2003 02:18:32 -0700: >> So you can use: >> >> if (-f $file) { >> : >> # process file >> } >> elsif (-d $file) { >> : >> # process directory >> } >> } > Well, yes of course I can run each filename thru all those tests, but that > seems kin

Re: SQL vs MySql?

2003-06-09 Thread James Edward Gray II
On Monday, June 9, 2003, at 04:00 AM, SNAG wrote: How compatible is MySQL to MSSql? If I have a MSSql database and relevant queries, etc., will I be able to use MySQL to access these? This is the Perl Beginner's list. You're looking for a MySQL list, which are readily available from the compan

RE: replacing text in a file

2003-06-09 Thread Dan Muey
> hello, > what is the easiest way to replace text in a file? say i > have file blah.txt > and i want to replace some regular expression found in that file with > something. also, i want to do this from within the perl > program, not by > invoking perl with the -e option. #!/usr/bin/perl -w

RE: how to count?

2003-06-09 Thread Dan Muey
> Hi! Howdy > > I am not sure if this can be done or not, but I want to > create a counter on the fly so to speak. > > foreach $id ( @IDS ) { > $cnt = "$id"."_cnt"; > $cnt++; > } > > All I get is "item_cnt". Is there a way to do this? You assigning a string to $cnt t

RE: hi, this is just a test

2003-06-09 Thread Dan Muey
> hi everybody, Howdy! > I'm new to the list. I'm testing now. Cool, welcome. > have fun! We will, you too. > > -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: forming quadrilateral from points

2003-06-09 Thread Rob Dixon
Guruguhan N wrote: > Hi All, >I am new to this group and recently started using Perl. I would like to > know whether it is possible to fit a > quadrilateral if four points are known in 3-D space ? if so, I would like to get > some idea about the algorithm to do that in > Perl. Any hel

RE: forming quadrilateral from points

2003-06-09 Thread Bob Showalter
N, Guruguhan (GEAE, JV, EACoE-India) wrote: > Hi All, >I am new to this group and recently started using > Perl. I would like to know whether it is possible to fit a > quadrilateral if four points are known in 3-D space ? if so, > I would like to get some idea about the algorithm to do

Re: replacing text in a file

2003-06-09 Thread Rob Dixon
Tassilo Von Parseval wrote: > On Mon, Jun 09, 2003 at 02:46:48AM -0500 christopher j bottaro wrote: > > > what is the easiest way to replace text in a file? say i have file blah.txt > > and i want to replace some regular expression found in that file with > > something. also, i want to do this fr

Re: SQL vs MySql?

2003-06-09 Thread Rob Dixon
Snag wrote: > Hi All, > How compatible is MySQL to MSSql? > If I have a MSSql database and relevant queries, etc., will I be able to use MySQL > to access these? MySQL will accept nearly all of the same standard syntax as SQL Server, but if the database is running under SQL Server then you have n

Re: replacing parts of a string

2003-06-09 Thread Rob Dixon
Christopher J Bottaro wrote: > hello, > i want to do something like: > $line =~ s/M (\d+) (\d+)/M $1+100 $2+200/; > obviously adding 100 to $1 and 200 to $2, not adding the text '+100' and > '+200'. use strict; my $line = ''; $line =~ s{M (\d+) (\d+)} { sprint

Re: Error

2003-06-09 Thread lobach
Thanks for this advice... I will definately take it and research it, and see how I can incorporate it into my stuff.. "R. Joseph Newton" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > [EMAIL PROTECTED] wrote: > > > Through much digging I found AddScrollbars was defined in Tk::Frame..

Re: SQL vs MySql?

2003-06-09 Thread SNAG
Thank you, that is the perfect answer to a total beginners question... - Original Message - From: "Rob Dixon" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, June 09, 2003 4:26 PM Subject: Re: SQL vs MySql? > Snag wrote: > > Hi All, > > How compatible is MySQL to MSSql? > > If I

RE: Best way of using a variable thoughout a number of modules...

2003-06-09 Thread Dan Muey
> Hamish Whittal wrote: > > Hi Everyone, > > > > I am needing to use some variables throughout all the > modules that I > > have created. I was wondering, bar setting them at the top of each > > module, what the best means of doing this is. Perhaps setting an > > environment variable, but wha

RE: Best way of using a variable thoughout a number of modules...

2003-06-09 Thread Bob Showalter
Dan Muey wrote: > > Hamish Whittal wrote: > > > Hi Everyone, > > > > > > I am needing to use some variables throughout all the modules > > > that I have created. I was wondering, bar setting them at the top > > > of each module, what the best means of doing this is. Perhaps > > > setting an enviro

RE: Best way of using a variable thoughout a number of modules...

2003-06-09 Thread Dan Muey
Thanks that info will come in handy > Dan Muey wrote: > > > Hamish Whittal wrote: > > > > Hi Everyone, > > > > > > > > I am needing to use some variables throughout all the > modules that > > > > I have created. I was wondering, bar setting them at the top of > > > > each module, what the best

Mail::Mailer

2003-06-09 Thread Tony Esposito
I need to get more info on the package Mail::Mailer, specifically how to use the 'open' method. Can anyone assist, please? Thanks! > Anthony (Tony) Esposito > Senior Technical Consultant > Inovis(tm) > 2425 N. Central Expressway, Suite 900 > Richardson, TX 75080 > (972) 643-3115 > [EMAIL PROT

Re: SQL vs MySql?

2003-06-09 Thread Josh Berkus
Rob, Snag, > MySQL will accept nearly all of the same standard syntax as SQL Server, > but if the database is running under SQL Server then you have no choice > but to use a SQL Server database driver to access it. Copy all the data > over to a MySQL database and you can then use MySQL in the same

RE: Mail::Mailer

2003-06-09 Thread Tony Esposito
To be more precise, I need an example of sending email via UNIX sendmail using the Mail::Mailer module. Thanks much. :-) > Anthony (Tony) Esposito > Senior Technical Consultant > Inovis(tm) > 2425 N. Central Expressway, Suite 900 > Richardson, TX 75080 > (972) 643-3115 > [EMAIL PROTECTED] >

Perl code displays on screen, won't execute

2003-06-09 Thread Ryan
I have a linux advanced server with perl 5.6.1 and my .pl scripts just show code on the screen. I am using apache and believe the problem may be within the httpd.conf file. Can anyone help? Thank you, Ryan -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROT

RE: Mail::Mailer

2003-06-09 Thread Tony Esposito
You all can ignore this thread.I walked away and came back.and figured it out. Thanks! > Anthony (Tony) Esposito > Senior Technical Consultant > Inovis(tm) > 2425 N. Central Expressway, Suite 900 > Richardson, TX 75080 > (972) 643-3115 > [EMAIL PROTECTED] > -Original Message--

Re: Mail::Mailer

2003-06-09 Thread Jair Santos
Please, send the code to the list. I would like to know because have a similar problem. thanks Jair - Original Message - From: "Tony Esposito" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, June 09, 2003 10:14 AM Subject: RE: Mail::Mailer > You all can ignore this thread..

RE: Perl code displays on screen, won't execute

2003-06-09 Thread Dan Muey
> > I have a linux advanced server with perl 5.6.1 and my .pl > scripts just show code on the screen. I am using apache and > believe the problem may be within the httpd.conf file. Can > anyone help? You are correct, you need to put a directive in to associate the .pl extension just as you wou

RE: Mail::Mailer

2003-06-09 Thread Tony Esposito
Sure...here it is... #= use Mail::Mailer; sub threshold_check() { my ($file_sys, $per_used, $threshold) = @_; my %mail_headers = ('From' => '[EMAIL PROTECTED]', 'To' => ['[EMAIL PROTECTED]', '[EMAIL PROTECTED]'], 'Subject' =

faster way to remove characters?

2003-06-09 Thread Johnson, Shaunn
Howdy: I have this bit of code (below) and I'm wondering if there is a quicker way to remove some odd-ball characters from very large text files (large would be about the 200M or so). [snip code] #!/usr/bin/perl #$_ =~ s/\cM\n/\n/g; while (<>) { $_ =~ s/(\cM\n|\\|\~|\!|\@|\#|\$|\%|\^|\&|\

Displaying Connections Or sessions to a Web site on NT/2000 Mach ines

2003-06-09 Thread Federico, Chris
Hi Group :), Does anyone know of a module or how to display users connected to the Web process of an NT/2000 Server in Perl . Checking the sessions on the machine only shows users opening files and not connected the the WWW process . This would come in real handy .. Can anyone steer me in th

RE: Perl code displays on screen, won't execute

2003-06-09 Thread Dave Tibbals
> Ryan wrote: > > I have a linux advanced server with perl 5.6.1 and my .pl > scripts just show code on the screen. I am using apache and > believe the problem may be within the httpd.conf file. Can > anyone help? > > Thank you, > Ryan > First check to make sure the script is executable by t

Re: faster way to remove characters?

2003-06-09 Thread Jenda Krynicky
From: "Johnson, Shaunn" <[EMAIL PROTECTED]> > I have this bit of code (below) and I'm wondering > if there is a quicker way to remove > some odd-ball characters from very > large text files (large would be about the > 200M or so). > > [snip code] > > #!/usr/bin/perl > > #$_ =~ s/\cM\n/\n/g; >

RE: faster way to remove characters?

2003-06-09 Thread Johnson, Shaunn
--thanks for the reply --you are correct; i did not have a chance to --remove the new line (\n) at the end of --the command string. The previous version --of this script was to replace the control-M --with new line (\n) ... i got carried away --after that (*thinking out loud* : i need some sort

RE: faster way to remove characters?

2003-06-09 Thread Jenda Krynicky
From: "Johnson, Shaunn" <[EMAIL PROTECTED]> > --you are correct; i did not have a chance to > --remove the new line (\n) at the end of > --the command string. The previous version > --of this script was to replace the control-M > --with new line (\n) ... i got carried away > --after that (*thinkin

Re: replacing text in a file

2003-06-09 Thread Tassilo von Parseval
On Mon, Jun 09, 2003 at 03:22:52PM +0100 Rob Dixon wrote: > Tassilo Von Parseval wrote: > > You can use the same underlying technique from within a Perl script. You > > have to set two special variables accordingly and Perl can even do an > > inplace-edit: > > > > local $^I = 1;

Re: lesson on multi-dimensional hashes?

2003-06-09 Thread Stuart White
Well, I figured out that the problem was not suited for a multi-dimensional hash, but rather just a hash. And I didn't know that hashes flattened out like arrays when one is stored within another. References are actually next on my list, but I've still a bit to go with hashes. Thanks for all the

Spliting comma delimited data

2003-06-09 Thread Rob Anderson
Hi All I have the following code, which I intend to use to save/restore an array to/from a text file with. As I'm using a comma to delilmit the data I'm escaping commas on the way out, an unescaping on the way in. This means that when I split the string into an array, I need to make sure I DON'T

Re: Why "Can't locate auto/Heap/add.al"?

2003-06-09 Thread Ying Liu
Thank you very much Janek! I found these bugs too and wrote to [EMAIL PROTECTED] but don't know why it is not sent out. And I wrote to the writer but no response :( In fact, it should use to specify it: @ISA = qw(Heap::Fibonacci); The Heap package is a front end class and use Heap::Fibonacci in

Re: Spliting comma delimited data

2003-06-09 Thread James Edward Gray II
On Monday, June 9, 2003, at 10:08 AM, Rob Anderson wrote: Is there some way to exclude the [^\\] part from being matched, err or something, help. my @restored_array = map { $_ =~ s/\\,/,/g; $_ } split(/[^\\],/, Try split /^(? That's only about my third ever "look-around assertion" though, so so

Simple Cookie problem

2003-06-09 Thread Dan Muey
Hello List, This is probably blatently stupid of me but here goes: I set a simple cookie using CGI::Cookie like so: #!/usr/bin/perl -w use strict; use CGI qw(:standard); use CGI::Cookie; my $cd = param('cd'); if($cd) { my $c = new CGI::Cookie( -name=> 'cd',

RE: Simple Cookie problem

2003-06-09 Thread Dan Muey
> Then I try to fetch it later with: > > use CGI::Cookie; > my $c = fetch CGI::Cookie; > > print $c{'cd'}; > > That print statement OUTPUTS > cd=whatever; path=/ > why isn't it just 'whatever', did I set the cookie wrong? > I can get the right value, IE 'whatever', by doing a split on > it

Net::Telnet -> getline(s)

2003-06-09 Thread
Hello, I am trying to query a service using a perl script with Net::Telnet. The first response of the server I am checking has three lines. For example: Service Name Date hello... When I use the following syntax, I get only the first line: $line = $service->getline; print $line; If I add the

Re: Displaying Connections Or sessions to a Web site on NT/2000 Mach ines

2003-06-09 Thread Mark G
> Checking the sessions on the machine only shows users > opening files hmm, I bin loking for a module that can tell me what process has a file opened on win box. what are you using ?? Mark G. - Original Message - From: "Federico, Chris" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent:

Re: typing files quickly

2003-06-09 Thread Harry Putnam
"Janek Schleicher" <[EMAIL PROTECTED]> writes: > Well, yes of course I can run each filename thru all those tests, but that >> seems kind of like a lot of huffing and puffing. I wondered if there >> isn't something that just spits it out. >> >> perl `stat' does do that very thing in element[2]

RE: * win32 user spy *

2003-06-09 Thread \(William\) Wenjie Wang
Windows Management Instrumentation (WMI) is a data-management layer that is included in Microsoft Windows 2000. >-Original Message- >From: Lance [mailto:[EMAIL PROTECTED] >Sent: Wednesday, 21 May 2003 10:40 PM >To: [EMAIL PROTECTED] >Subject: Re: * win32 user spy * > > >What is WMI? And wh

There is virus attached : Re: Age Of Empires - Cheats

2003-06-09 Thread Voodoo Raja
Hi all.. just to get you updated .. I recieved a email: I bet the mailing list@ perl.org.. is down the drain with bubear... Please be careful on this.. It has already cost me my network.. Regards Sam From: alan <[EMAIL PROTECTED]> Subject: Age Of Empires - Cheats Date: 9 Jun 2003 01:02:18 -0700

Re: typing files quickly

2003-06-09 Thread Steve Grazzini
Harry Putnam <[EMAIL PROTECTED]> wrote: > "Janek Schleicher" <[EMAIL PROTECTED]> writes: >> >> The underscore _ holds the results of the last stat call >> (implicitly called by the -f operator), so no unnecessary >> work needs to be done. > > I've seen that `_' crop up before > I don't understan

Re: Spliting comma delimited data

2003-06-09 Thread Janek Schleicher
Rob Anderson wrote at Mon, 09 Jun 2003 16:08:54 +0100: > I have the following code, which I intend to use to save/restore an array > to/from a text file with. > > As I'm using a comma to delilmit the data I'm escaping commas on the way > out, an unescaping on the way in. This means that when I sp