Re: How do you build your HTML?

2003-12-16 Thread R. Joseph Newton
Kevin Old wrote: > Hi Chris, > > Well, I already use HTML::Mason as a templating engine and everything is > fine. What I need is a way to generate HTML 4.01 compliant HTML. > Basically taking the concept of CGI.pm, but keeping the resulting HTML > up to date with the HTML specifications. For exa

how to print modification date

2003-12-16 Thread Stephan Hochhaus
Hello list, I tried to dig my way through my newly acquired Perl ina nutshell and Learning Perl, but I couldn't find a satisfying solution to my problem: How can I print the last modification date of a file? It should work on different systems (*nix and OS X, Win32 is nice to have but not a mu

How to Create a hash using SQL 2000

2003-12-16 Thread neill . taylor
I am using activestate version 5.8 on XP with DBI 1.38. I am trying to return values into an associative array so that I don't keep needing to connect to the database. I am new to perl and DBI is looking like rocket science. The code below has been gleaned from the Internet so I am not completely

RE: how to print modification date

2003-12-16 Thread Bob Showalter
Stephan Hochhaus wrote: > Hello list, > > I tried to dig my way through my newly acquired Perl ina nutshell and > Learning Perl, but I couldn't find a satisfying solution to my > problem: > > How can I print the last modification date of a file? It should work > on different systems (*nix and OS

Re: How to Create a hash using SQL 2000

2003-12-16 Thread Ricardo SIGNES
* [EMAIL PROTECTED] [2003-12-16T07:21:19] > I am using activestate version 5.8 on XP with DBI 1.38. I am trying to > return values into an associative array so that I don't keep needing to > connect to the database. I am new to perl and DBI is looking like rocket > science. The code below has been

Re: Split question

2003-12-16 Thread Rob Dixon
John wrote: > > Here is a little quiz for you beginners out there. split() treats its > first argument as a regular expression. There are TWO exceptions where > the first argument does not behave the same as a normal regular > expression. What are they? I know! Please sir! Actually this 'backw

mysql cgi admin and client

2003-12-16 Thread George Georgalis
Hi, I thought there was something like myphpadmin (for mysql) in perl but I'm not finding it. I'm looking for a perl or mod_perl cgi, to create (as admin) mysql database and tables, data entry interface and access client. Ideally template / css based. Lots of companies sell this sort og thing for

Re: Please help me! Thanks.

2003-12-16 Thread Mr M senthil kumar
On Tue, 16 Dec 2003, pagoda wrote: > > for (my $value = -1; $value <= 1; $value += 0.1) { > print "$value\n"; > } Hi, I don't know if it might be helpful, but the following code works better: for ($value = -1; $value <= 1; $value += 0.1) { printf ("%.1f\n",$value); } This p

Re: mysql cgi admin and client

2003-12-16 Thread George Georgalis
After I wrote that, I made some good progress... notably: http://www.thedumbterminal.co.uk/software/webmysql.shtml This might be good too, haven't tried http://sourceforge.net/projects/mysqltool/ // George On 12/15/03, George Georgalis wrote: >Hi, > >I thought there was something like myphpadmin

RE: mysql cgi admin and client

2003-12-16 Thread NYIMI Jose (BMB)
Try http://www.gossamer-threads.com/scripts/mysqlman/index.htm José. -Original Message- From: George Georgalis [mailto:[EMAIL PROTECTED] Sent: Tuesday, December 16, 2003 6:14 AM To: [EMAIL PROTECTED] Subject: Re: mysql cgi admin and client After I wrote that, I made some good progress.

Re: pass vars to sub via TK/Button

2003-12-16 Thread R. Joseph Newton
Oliver Schaedlich wrote: > > my $win = MainWindow->new(height => 150, -width => 250); > > Hmm, are you sure this works? [blushin' deep red] Uh, no, actually, I'm pretty sure it doesn't. The MainWindow seems to grow only to the size dictated by its geometry manager to hold all the controls to be

Re: pass vars to sub via TK/Button

2003-12-16 Thread R. Joseph Newton
Oliver Schaedlich wrote: > Greetings, > > 15.12.2003, zentara wrote: > > > $main ->> Button > > ( -text => 'Add', > > -command => sub{\&add_item($var1,$var2)} > > ) -> pack; > [...] > > sub add_item { > [...] > >my $entry1 = $_[0]->get(); > >my $entry2 = $_[1]->get(); > [...]

Re: Please help me! Thanks.

2003-12-16 Thread R. Joseph Newton
Paul Johnson wrote: > On Tue, Dec 16, 2003 at 02:25:42PM +0800, pagoda wrote: > > > now, a stupid solution is: > > > > for (my $value = -1000; $value <= 1000; $value += 100) { > > print $value/1000, "\n"; > > } > > > > hehe, > > Not so stupid, really. If you can keep most of your maths co

What would be the best data structure to keep these values

2003-12-16 Thread Hemond, Steve
Hi people, I want trap the results of 'ps -ef' command. I first trap the results by splitting the results in scalar values such as $uid $pid $ppid $stime, etc... I would like, for each line returned, to hold these values in an array, so that, for each uid, I could return its corresponding pid,

Re: Please help me! Thanks.

2003-12-16 Thread Rob Dixon
Hacksaw wrote: > > > now, a stupid solution is: > > > > for (my $value = -1000; $value <= 1000; $value += 100) { > > print $value/1000, "\n"; > > } > > > > hehe, > > > > Sadly, it's not as stupid as you think. Unless I misunderstand things, what > you are seeing here is a problem called IEE

Re: pass vars to sub via TK/Button

2003-12-16 Thread Oliver Schaedlich
Greetings, 16.12.2003, R. Joseph Newton wrote: > There is no decoding happening. Entry is a Tk widget. It is not a > string. The string contents are a property held in the widget's hash. > The get method is an accessor function that returns this value. AFAIK, Tk > does not use the sort of de

Comparing Hashes with different keys. How ?

2003-12-16 Thread John Hennessy
Hi, I have two different hashes built from separate data and need to find the common then differing items. $HoA1{$custnum} = [ $uid, $firstname, $lastname ]; $HoA2{$uid} = [ $custnum, $firstname, $lastname ]; I have looked at examples for "Finding Common or Different Keys in Two Hashes" but the

Re: How to Create a hash using SQL 2000

2003-12-16 Thread R. Joseph Newton
[EMAIL PROTECTED] wrote: > I am using activestate version 5.8 on XP with DBI 1.38. I am trying to > return values into an associative array so that I don't keep needing to > connect to the database. I am new to perl and DBI is looking like rocket > science. The code below has been gleaned from the

Re: What would be the best data structure to keep these values

2003-12-16 Thread Ricardo SIGNES
* "Hemond, Steve" <[EMAIL PROTECTED]> [2003-12-16T10:13:31] > I want trap the results of 'ps -ef' command. > > I first trap the results by splitting the results in scalar values > such as $uid $pid $ppid $stime, etc... > > I would like, for each line returned, to hold these values in an > array,

Re: Comparing Hashes with different keys. How ?

2003-12-16 Thread James Edward Gray II
On Dec 16, 2003, at 9:36 AM, John Hennessy wrote: Hi, I have two different hashes built from separate data and need to find the common then differing items. $HoA1{$custnum} = [ $uid, $firstname, $lastname ]; $HoA2{$uid} = [ $custnum, $firstname, $lastname ]; I have looked at examples for "Findin

RE: Server Errors

2003-12-16 Thread Dan Muey
> I've got the below script saved on my server - but every time > I use it I get an Internel Server Error! I've set the > permission to 755 but still no luck. Any ideas folks? > > www.klconsulting.co.uk/cgi-bin/cssc.pl > > If you run it in abrowser: 1) is it execuatbale? 2) is

Re: Comparing Hashes with different keys. How ?

2003-12-16 Thread Rob Dixon
John Hennessy wrote: > > Hi, I have two different hashes built from separate data and need to > find the common then differing items. > > $HoA1{$custnum} = [ $uid, $firstname, $lastname ]; > $HoA2{$uid} = [ $custnum, $firstname, $lastname ]; > > I have looked at examples for "Finding Common or Diff

Re: What would be the best data structure to keep these values

2003-12-16 Thread Rob Dixon
Steve Hemond wrote: > > I want trap the results of 'ps -ef' command. > > I first trap the results by splitting the results in scalar values such as $uid $pid > $ppid $stime, etc... > > I would like, for each line returned, to hold these values in an array, so that, for > each uid, I could > retur

RE: Server Errors

2003-12-16 Thread Dan Muey
> > I've got the below script saved on my server - but every time > > I use it I get an Internel Server Error! I've set the > > permission to 755 but still no luck. Any ideas folks? > > > > www.klconsulting.co.uk/cgi-bin/cssc.pl > > > > > If you run it in abrowser: > 1) is it execuatbale

Re: What would be the best data structure to keep these values

2003-12-16 Thread Wiggins d Anconia
> Hi people, > > I want trap the results of 'ps -ef' command. > > I first trap the results by splitting the results in scalar values such as $uid $pid $ppid $stime, etc... > > I would like, for each line returned, to hold these values in an array, so that, for each uid, I could return its corr

Re: How to Create a hash using SQL 2000

2003-12-16 Thread R. Joseph Newton
Ricardo SIGNES wrote: > [Good points, all] > (b) make %queue an array; if it's really a queue (and you're going to be > shifting work off the bottom) an array is more natural. Then the loop > would read: > while ($sth->fetchrow_hashref) { > push @queue, $_; > } >

Re: Please help me! Thanks.

2003-12-16 Thread drieux
On Dec 16, 2003, at 7:16 AM, Rob Dixon wrote: [..] Rob use strict; use warnings; use Math::Fraction; for (my $value = frac -1; $value <= 1; $value += 0.1) { print $value->decimal, "\n"; } [..] neat solution, minor problem is that Math::Fraction is not a 'default' module yet.

Re: Please help me! Thanks.

2003-12-16 Thread R. Joseph Newton
Rob Dixon wrote: > Hacksaw wrote: > > > > > now, a stupid solution is: > > > > > > for (my $value = -1000; $value <= 1000; $value += 100) { > > > print $value/1000, "\n"; > > > } > > > > > > hehe, > > > > > > > Sadly, it's not as stupid as you think. Unless I misunderstand things, what > >

Re: Comparing Hashes with different keys. How ?

2003-12-16 Thread Jenda Krynicky
Date sent: Tue, 16 Dec 2003 23:36:16 +0800 From: John Hennessy <[EMAIL PROTECTED]> To: [EMAIL PROTECTED] Subject:Comparing Hashes with different keys. How ? > Hi, I have two different hashes built from separate data and need to > f

Re: What would be the best data structure to keep these values

2003-12-16 Thread drieux
On Dec 16, 2003, at 7:13 AM, Hemond, Steve wrote: [..] I first trap the results by splitting the results in scalar values such as $uid $pid $ppid $stime, etc... I would like, for each line returned, to hold these values in an array, so that, for each uid, I could return its corresponding pid, p

Re: mysql cgi admin and client

2003-12-16 Thread R. Joseph Newton
George Georgalis wrote: > After I wrote that, I made some good progress... notably: > http://www.thedumbterminal.co.uk/software/webmysql.shtml > > This might be good too, haven't tried > http://sourceforge.net/projects/mysqltool/ > > // George That sounds good. You didn't say what myphpadmin doe

Re: What would be the best data structure to keep these values

2003-12-16 Thread R. Joseph Newton
"Hemond, Steve" wrote: > Hi people, > > I want trap the results of 'ps -ef' command. > > I first trap the results by splitting the results in scalar values such as $uid $pid > $ppid $stime, etc... > > I would like, for each line returned, to hold these values in an array, so that, for > each uid

Re: Comparing Hashes with different keys. How ?

2003-12-16 Thread R. Joseph Newton
John Hennessy wrote: > Hi, I have two different hashes built from separate data and need to > find the common then differing items. > > $HoA1{$custnum} = [ $uid, $firstname, $lastname ]; > $HoA2{$uid} = [ $custnum, $firstname, $lastname ]; > > I have looked at examples for "Finding Common or Diffe

Error when running pmake to compile a module

2003-12-16 Thread msheffie
This is my first attempt to compile a module downloaded from the web. The instructions in the 'readme' file are: Extract the archive. Then run the following commands. perl Makefile.PL make make install I didn't have make, so I installed a perl module called make, that runs pmake. Below are th

Re: Please help me! Thanks.

2003-12-16 Thread Rob Dixon
R. Joseph Newton wrote: > > Rob Dixon wrote: > > > > It's also worth pointing out here that rational values are almost always what is > > wanted in this sort of situation. > > > > The (very nice indeed) Math::Fraction module lets you do just this. The only > > changes to the code are to initialise

Re: What would be the best data structure to keep these values

2003-12-16 Thread drieux
On Dec 16, 2003, at 9:32 AM, R. Joseph Newton wrote: [..] I am assuming here that the ppid is a sub-process id. Basically, use any field that constitutes a GUID as the key for each child hash. [..] other way around, ppid - parent process id. Given a Pid the system needs to know whom the Parent

Re: Error when running pmake to compile a module

2003-12-16 Thread Rob Dixon
<[EMAIL PROTECTED]> wrote: > > This is my first attempt to compile a module downloaded from the web. The > instructions in the 'readme' file are: > > Extract the archive. Then run the following commands. > perl Makefile.PL > make > make install > > I didn't have make, so I installed a perl module

Internal -e escape char

2003-12-16 Thread Dan Muey
Howdy, I just finished a script that does Benchmarking from a web based form. It's pretty handy since all I have to do it tell it how many different pieces of code I want to run, type them in and see the results. I did this because it is quick and easy and I can use it when all I have is web a

Out of memory error problem

2003-12-16 Thread Perl
I wrote a small script that uses message ID's as unique values and extracts recipient address info. The goal is to count 1019 events per message ID. It also gets the sum of recipients per message ID. The script works fine but when it runs against a very large file (2GB+) I receive an out of memory

Re: pass vars to sub via TK/Button

2003-12-16 Thread R. Joseph Newton
zentara wrote: > The first is that you cannot count on a sub call always passing > the caller. In some languages, like gtk2, when you call a sub, > $_[0] is always the widget that called it. But in Tk, sometimes it is, > and sometimes it isn't. If in doubt, just print @_ in your subs and > see

Re: Out of memory error problem

2003-12-16 Thread James Edward Gray II
On Dec 16, 2003, at 1:15 PM, Perl wrote: I wrote a small script that uses message ID's as unique values and extracts recipient address info. The goal is to count 1019 events per message ID. It also gets the sum of recipients per message ID. The script works fine but when it runs against a very lar

Align text

2003-12-16 Thread Hemond, Steve
Hi again, Thanks for you help with my data structure problem, a hash of hashes problem did the job :-) I would like to know how to align text with the print command. I have four scalar variables to print but I want them to follow their header's size. So, if the header is 8 chars long, I would l

Re: Align text

2003-12-16 Thread James Edward Gray II
\On Dec 16, 2003, at 1:39 PM, Hemond, Steve wrote: Hi again, Thanks for you help with my data structure problem, a hash of hashes problem did the job :-) I would like to know how to align text with the print command. I have four scalar variables to print but I want them to follow their header's

Re: Internal -e escape char

2003-12-16 Thread david
Dan Muey wrote: [snip] > I could replace all single quotes with double quotes and escape everythgin > inbetween them but that seems like a lot. > > Any ideas how to deal with the single quotes? (Since shell escape > characters may or may not work since apache is executing it) after trying (a fe

Can I set '$!' ?

2003-12-16 Thread Ken Lehman
I want to be able to return a true or false value from a function in a module and populate the $! variable with the specific errors. Is this possible? Is there documentation on how to do this? I can find docs on how to use $! but not how to set it. Thanks for any help -Ken ---

Converting using a hash

2003-12-16 Thread Jan Eden
Hi, sorry for the lengthy post. I recently wrote a Perl script to convert 8-bit characters to LaTeX commands. The first version (which works just fine) looks like this (the ... indicates more lines to follow): >#!/usr/bin/perl -pw > >s/â/{\\glqq}/g; >s/â/{\\grqq}/g; >s/Ã/\\'{a}/g; >s/Ã/\\`{a}/

Re: Can I set '$!' ?

2003-12-16 Thread Jenda Krynicky
From: Ken Lehman <[EMAIL PROTECTED]> > I want to be able to return a true or false value from a function in a > module and populate the $! variable with the specific errors. Is this > possible? Is there documentation on how to do this? I can find docs on > how to use $! but not how to set it. Thank

Re: Converting using a hash

2003-12-16 Thread Jenda Krynicky
From: Jan Eden <[EMAIL PROTECTED]> > I recently wrote a Perl script to convert 8-bit characters to LaTeX > commands. The first version (which works just fine) looks like this > (the ... indicates more lines to follow): > > >#!/usr/bin/perl -pw > > > >s/âÇ?/{\\glqq}/g; > >s/âÇ?/{\\grqq}/g; > >s/Ăí/\

Re: Can I set '$!' ?

2003-12-16 Thread david
Ken Lehman wrote: > I want to be able to return a true or false value from a function in a > module and populate the $! variable with the specific errors. Is this > possible? Is there documentation on how to do this? I can find docs on how > to use $! but not how to set it. Thanks for any help $!

Re: Can I set '$!' ?

2003-12-16 Thread John W. Krahn
Ken Lehman wrote: > > I want to be able to return a true or false value from a function in a > module and populate the $! variable with the specific errors. Is this > possible? Is there documentation on how to do this? I can find docs on how > to use $! but not how to set it. Thanks for any help

script for passwd file

2003-12-16 Thread rmck
Hi, I'm stuck and that I would ask if anyone has a script to check for empty passwords /etc/passwd/ /etc/shadow and then lock them Thanks Rob -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Converting using a hash

2003-12-16 Thread John W. Krahn
Jan Eden wrote: > > Hi, Hello, > sorry for the lengthy post. > > I recently wrote a Perl script to convert 8-bit characters to LaTeX > commands. The first version (which works just fine) looks like this > (the ... indicates more lines to follow): Your regular expressions look like they are lon

Re: script for passwd file

2003-12-16 Thread R. Joseph Newton
rmck wrote: > Hi, > > I'm stuck and that I would ask if anyone has a script to check for empty passwords > /etc/passwd/ /etc/shadow and then lock them Thanks > > Rob So what have you tried? Joseph -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTE

Re: Converting using a hash

2003-12-16 Thread Jeff 'japhy' Pinyan
On Dec 16, Jan Eden said: >>#!perl >> >>%enctabelle = (...); >> >>my $re = '(' . join('|', map quotemeta($_), keys %enctabelle) . ')'; >>$re = qr/$re/; >> >>while (<>) { >> s/$re/$enctabelle{$1}/g; >> print; >>} Let me explain this for you, and fix it, too. # this produces 'key1|key2|key3|..

Re: Out of memory error problem

2003-12-16 Thread drieux
On Dec 16, 2003, at 11:15 AM, Perl wrote: [..] The script works fine but when it runs against a very large file (2GB+) I receive an out of memory error. was the perl that you are using built to work with large datafiles? There is a USE_LARGE_FILE that is normally set, and you would see it with per

Managing PS data was -Re: What would be the best data structure to keep these values

2003-12-16 Thread drieux
On Dec 16, 2003, at 7:13 AM, Hemond, Steve wrote: [..] I first trap the results by splitting the results in scalar values such as $uid $pid $ppid $stime, etc... I would like, for each line returned, to hold these values in an array, so that, for each uid, I could return its corresponding pid,

RE: script for passwd file

2003-12-16 Thread Tom Kinzer
we'll be curious to see what you come up with for a solution, rob. *and help if you get stuck* -Tom Kinzer -Original Message- From: rmck [mailto:[EMAIL PROTECTED] Sent: Tuesday, December 16, 2003 5:01 PM To: [EMAIL PROTECTED] Subject: script for passwd file Hi, I'm stuck and that I w