Re: about cron and perl

2005-11-04 Thread Shawn Corey
ZHAO, BING wrote: Hi, I was advised to check out man cron for how to use cron. Set off do_it.pl using cron. But that's about it , all I can get from web help. I have no clue: 1. what should I include in the do_it.pl, say to delete certain old files? 2. this is a m

Re: hash of hash - copy

2005-11-04 Thread Frank Bax
At 03:17 PM 11/4/05, Jeff 'japhy' Pinyan wrote: On Nov 4, Frank Bax said: $aSuit{0}{'a'} = 'A'; $aSuit{0}{'b'} = 'B'; $aSuit{0}{'c'} = 'C'; $aSuit{1}{'a'} = 'D'; $aSuit{1}{'b'} = 'E'; $aSuit{1}{'c'} = 'F'; Now I want to make $aSuit{1} a copy of $aSuit{0} %aSuit{1} = %aSuit{0}; Well,

Which Module for XPath on HTML?

2005-11-04 Thread Siegfried Heintze
I'm looking at CPAN searching for XPath and feeling lost. In Java I can use jtidy to read html into a standard XML DOM (org.w3c.dom to be exact) and search that DOM with Xpath. Can I do that in perl? If so, which modules do I want? Thanks, Siegfried -- To unsubscribe, e-mail: [EMAIL PROTECTED

RE: hash of hash - copy

2005-11-04 Thread Wagner, David --- Senior Programmer Analyst --- WGO
Frank Bax wrote: > #!/usr/bin/perl -w > use strict; > > my %aSuit = (); > > $aSuit{0}{'a'} = 'A'; > $aSuit{0}{'b'} = 'B'; > $aSuit{0}{'c'} = 'C'; > $aSuit{1}{'a'} = 'D'; > $aSuit{1}{'b'} = 'E'; > $aSuit{1}{'c'} = 'F'; > > Now I want to make $aSuit{1} a copy of $aSuit{0} > %aSuit{1} = %aSu

Re: hash of hash - copy

2005-11-04 Thread Jeff 'japhy' Pinyan
On Nov 4, Frank Bax said: $aSuit{0}{'a'} = 'A'; $aSuit{0}{'b'} = 'B'; $aSuit{0}{'c'} = 'C'; $aSuit{1}{'a'} = 'D'; $aSuit{1}{'b'} = 'E'; $aSuit{1}{'c'} = 'F'; Now I want to make $aSuit{1} a copy of $aSuit{0} %aSuit{1} = %aSuit{0}; Well, $aSuit{1} = $aSuit{0} would make $aSuit{1} and $a

hash of hash - copy

2005-11-04 Thread Frank Bax
#!/usr/bin/perl -w use strict; my %aSuit = (); $aSuit{0}{'a'} = 'A'; $aSuit{0}{'b'} = 'B'; $aSuit{0}{'c'} = 'C'; $aSuit{1}{'a'} = 'D'; $aSuit{1}{'b'} = 'E'; $aSuit{1}{'c'} = 'F'; Now I want to make $aSuit{1} a copy of $aSuit{0} %aSuit{1} = %aSuit{0}; This doesn't work (syntax error), w

Re: How do i create a basic form that can be emailed to a database?

2005-11-04 Thread JupiterHost.Net
Misty Kesler wrote: I Just would like to know a lot of those already made forms, just don't work. Any help is appreciated I'd say just take the form (use CGI) and put it in a database (use DBI) instead of emailing (use Mail::Sender) it to and address that is setup to pipe it to a scri

Re: Checking pixel sizes

2005-11-04 Thread Mike Blezien
Thanks, apprecite it. that worked fine. zentara wrote: On Thu, 03 Nov 2005 15:29:33 -0600, [EMAIL PROTECTED] (Mike Blezien) wrote: Hello, I'm using ImageMagick to create thumbnails and other image manipulation with a upload script. And was wondering if the actual pixel size can be checked w

Re: Dates

2005-11-04 Thread Jeff 'japhy' Pinyan
On Nov 4, Scott Taylor said: I have a date in UT that looks like this: "2005-11-02 01:36:00.0" Can anyone tell me the best way to subtract 8 hours from it, or to convert it to PDT? I'm reading up on Date::Manip, but I don't know if that is going to help, yet. Date::Manip can probably do it,

RE: Dates

2005-11-04 Thread Timothy Johnson
Check out the Time::Local module. It will let you convert your text date into Perl time() format. -Original Message- From: Scott Taylor [mailto:[EMAIL PROTECTED] Sent: Friday, November 04, 2005 11:36 AM To: beginners@perl.org Subject: Dates Hello, I have a date in UT that looks like

Dates

2005-11-04 Thread Scott Taylor
Hello, I have a date in UT that looks like this: "2005-11-02 01:36:00.0" Can anyone tell me the best way to subtract 8 hours from it, or to convert it to PDT? I'm reading up on Date::Manip, but I don't know if that is going to help, yet. Cheers. -- Scott -- To unsubscribe, e-mail: [EMAIL PR

RE: about cron and perl

2005-11-04 Thread Steve Bertrand
>1. what should I include in the do_it.pl, say to > delete certain old files? I don't understand what you are getting at here. Are you asking us how to write a script to perform this certain task? What have you tried so far? >2. this is a more unix problem, how should I

RE: about cron and perl

2005-11-04 Thread Ryan Frantz
> -Original Message- > From: ZHAO, BING [mailto:[EMAIL PROTECTED] > Sent: Friday, November 04, 2005 2:16 PM > To: beginners@perl.org > Subject: about cron and perl > > Hi, >I was advised to check out man cron for how to use cron. Set > off do_it.pl using cron. > But that's ab

about cron and perl

2005-11-04 Thread ZHAO, BING
Hi, I was advised to check out man cron for how to use cron. Set off do_it.pl using cron. But that's about it , all I can get from web help. I have no clue: 1. what should I include in the do_it.pl, say to delete certain old files? 2. this is a more unix problem, h

How do i create a basic form that can be emailed to a database?

2005-11-04 Thread Misty Kesler
I Just would like to know a lot of those already made forms, just don't work. Any help is appreciated Thanks- Misty P Kesler misty.tcfn.org

Re: conditional use()

2005-11-04 Thread JupiterHost.Net
Jeff 'japhy' Pinyan wrote: On Nov 4, JupiterHost.Net said: I'm beating my head against the wall trying to remember where I saw this / how to do this: In some documentation I remember seeing a use statement that had some sort of condition. use if ...; perldoc if YES Jeff you ro

Re: conditional use()

2005-11-04 Thread Jeff 'japhy' Pinyan
On Nov 4, JupiterHost.Net said: I'm beating my head against the wall trying to remember where I saw this / how to do this: In some documentation I remember seeing a use statement that had some sort of condition. use if ...; perldoc if -- Jeff "japhy" Pinyan% How can we ever be

conditional use()

2005-11-04 Thread JupiterHost.Net
Howdy Perl Studs I'm beating my head against the wall trying to remember where I saw this / how to do this: In some documentation I remember seeing a use statement that had some sort of condition. Its the same idea as how: use Foo if $WE_DO_WANT_FOO; reads (but of course that doesn't wor

Re: XML Help

2005-11-04 Thread Scott Taylor
Bob Showalter said: > Scott Taylor wrote: >> Hi All, >> >> I'm using XML::Simple to parse a very simple XML file and dump the data >> into hashes of hashes. >> >> The problem I'm getting, is sometimes information is blank in the XMl >> file; it looks like this: >> >> instead of >> 1234 >> >> and

Re: XML Help

2005-11-04 Thread Scott Taylor
Bob Showalter said: > Scott Taylor wrote: >> Dermot Paikkos said: >>>I would also say that the source file is wrong, it should read >>> >> >> >> I read somewhere that is correct syntax (same as ) > > You are correct. The two forms are exactly equivalent. see: > http://www.w3.org/TR/REC-xml/#sec-s

RE: What am I doing wrong?

2005-11-04 Thread Jeff 'japhy' Pinyan
#!/usr/bin/perl # # webstore-rijselect-5-werkt.pl # use warnings; use strict; use integer; use DBI; my ($dbh, $sth, $sta, $sql_een, $sql_twee, $i, $n, @sku, @qty, @t_qty); You'v

RE: What am I doing wrong?

2005-11-04 Thread Steve Bertrand
It's very early in the morning yet, so forgive any oversight or mistakes I haven't noticed in this post. Here goes some things I saw...again though, without the actual data, it's hard to read into it properly: > > HERE'S MY SCRIPT: > #!/usr/bin/perl > ##

Re: regex search/replace syntax

2005-11-04 Thread John W. Krahn
Gary Stainburn wrote: > Hi folks I've got the following code which generates > > Parse error: parse error in /home/httpd/html/consumables.html on line > 290 That message did not come from perl. perldoc perldiag > when I try to run it. The script doesn't run because of the parse error > >

Re: regex search/replace syntax

2005-11-04 Thread Xavier Noria
On Nov 4, 2005, at 13:58, Gary Stainburn wrote: On Friday 04 November 2005 12:20 pm, Xavier Noria wrote: On Nov 4, 2005, at 13:03, Gary Stainburn wrote: Hi folks I've got the following code which generates Parse error: parse error in /home/httpd/html/consumables.html on line 290 when I try

Re: regex search/replace syntax

2005-11-04 Thread Gary Stainburn
On Friday 04 November 2005 12:20 pm, Xavier Noria wrote: > On Nov 4, 2005, at 13:03, Gary Stainburn wrote: > > Hi folks I've got the following code which generates > > > > Parse error: parse error in /home/httpd/html/consumables.html on > > line 290 > > > > when I try to run it. The script doesn't

regex search/replace syntax

2005-11-04 Thread Gary Stainburn
Hi folks I've got the following code which generates Parse error: parse error in /home/httpd/html/consumables.html on line 290 when I try to run it. The script doesn't run because of the parse error $orderSQL=~s/TOTAL/$or_total/; $orderSQL is a string containing a number of SQL statements

Re: regex search/replace syntax

2005-11-04 Thread Xavier Noria
On Nov 4, 2005, at 13:03, Gary Stainburn wrote: Hi folks I've got the following code which generates Parse error: parse error in /home/httpd/html/consumables.html on line 290 when I try to run it. The script doesn't run because of the parse error $orderSQL=~s/TOTAL/$or_total/; $orderS

Re: Checking pixel sizes

2005-11-04 Thread Dermot Paikkos
On 3 Nov 2005 at 15:29, Mike Blezien wrote: > Hello, > > I'm using ImageMagick to create thumbnails and other image manipulation with > a > upload script. And was wondering if the actual pixel size can be checked with > ImageMagick ?? I've used Image::Size to do this, but was wondering it can

Re: regex search/replace syntax

2005-11-04 Thread Gary Stainburn
On Friday 04 November 2005 12:03 pm, Gary Stainburn wrote: [snip] > $orderSQL is a string containing a number of SQL statements with the > placeholder &total; and $or_total has a value of '695.76' > Sorry, the placeholder is TOTAL not &total. I changed it to see if it made a difference, which it

Re: What am I doing wrong?

2005-11-04 Thread Gary Stainburn
On Friday 04 November 2005 12:12 pm, jean wrote: > hello there, > > Being new to PERL, I've found this very informative list and I've > been playing around with PERL a bit. > > Right now I'm working on some code that picks up items from my > database and calculates the total stock for identical ite

Re: What am I doing wrong?

2005-11-04 Thread Gary Stainburn
On Friday 04 November 2005 12:12 pm, jean wrote: [snip] > > foreach (my @result = $sth->fetchrow_array) { > $sku[$i]=$result[0]; > $qty[$i]=$result[1]; > $t_qty[$i]=0; > if ($i < 2) { > $t_qty[$i]=$qty[$i]; > } > else { >

What am I doing wrong?

2005-11-04 Thread jean
hello there, Being new to PERL, I've found this very informative list and I've been playing around with PERL a bit. Right now I'm working on some code that picks up items from my database and calculates the total stock for identical items. I've created a small database to try out my script.