RE: pop-up box JOIN() to mysql not populating dates

2002-02-02 Thread Steve Howard
Correction to a syntax error I left. The insert query should be: my $insert = qq{INSERT INTO News (ntitle, ndate, nurl, nblurb, nsource) VALUES(?, ?, ?, ?, ?)}; I pasted yours in, and edited, and forgot to delete the first double quote. Just wanted to clear that up since I was c

Re: is false self-evident? [was Re: Perl trainer requests beginner help]

2002-02-02 Thread John W. Krahn
"Michael R. Wolf" wrote: > > [EMAIL PROTECTED] (John W. Krahn) writes: > > > > Are you sure there are only three? :-) > > > > $ perl -le' > > print qq(undef is FALSE) unless undef; > > print qq("" is FALSE)unless ""; > > print qq("0" is FALSE) unless "0"; > > print qq(0 is FALSE) unle

Re: Perl FAQ

2002-02-02 Thread Dave Benware
"Brett W. McCoy" wrote: > > On Sat, 2 Feb 2002, Dave Benware wrote: > > > This is not a newsgroup, it's an email discussion list. > > It's also accessible via nntp.perl.org as a newsgroup. > > > The *list* doesn't have a FAQ of it's own although there has been a bit of > > talk regarding cre

RE: pop-up box JOIN() to mysql not populating dates

2002-02-02 Thread Steve Howard
Keith, I can't tell much from what I'm seeing that should cause a problem. I might suggest a couple of steps for tracking it down, then I'll offer you a bit of advice on safely inserting data that in taken from user input. First, you have said that the print from the year prints the date in the f

Re: counting the recurrence of lines - du-oh,...

2002-02-02 Thread John W. Krahn
David Wright wrote: > > excellent, thanks for two great answers. I actually tried (! defined) > but i tried it on @storeList=; which did not produce the > desired results at all : -( > > John wrote: > "The reason you are getting the warnings is because of $saveNum{$dup} on > the right hand sid

pop-up box JOIN() to mysql not populating dates

2002-02-02 Thread Keith A. Calaman
I am resending this to the group because I haven't gotten a response nor have I got it to work. I won't send it again but I thought someone who could help may have missed it. I have pasted my code below. The problem I am having is: my $ndate = join('-', $nyear,$nmonth,$nday); is printing back

is false self-evident? [was Re: Perl trainer requests beginner help]

2002-02-02 Thread Michael R. Wolf
[EMAIL PROTECTED] (John W. Krahn) writes: > "Michael R. Wolf" wrote: > > [...] > > Any value that is not false is true. What 3 values indicate > > false? > > > Are you sure there are only three? :-) > > $ perl -le' > print qq(undef is FALSE) unless undef; > print qq("" is FALSE)unless

RE: counting the recurrence of lines - du-oh,...

2002-02-02 Thread Steve Howard
I don't think you are understanding the increment notation. To increment $saveNum($dup}, all you want on the line is this: $saveNum{$dup}++; not: $saveNum{$dup} = $saveNum{$dup}++; Steve H. -Original Message- From: david wright [mailto:[EMAIL PROTECTED]] Sent: Saturday, February 02,

Re: counting the recurrence of lines - du-oh,...

2002-02-02 Thread david wright
excellent, thanks for two great answers. I actually tried (! defined) but i tried it on @storeList=; which did not produce the desired results at all : -( John wrote: "The reason you are getting the warnings is because of $saveNum{$dup} on the right hand side of the expression. Use either: $

Re: counting the recurrence of lines - du-oh,...

2002-02-02 Thread John W. Krahn
David Wright wrote: > > > > I'm trying to count the recurrence of lines in a file. This works > > how i want but first it prints "Use of uninitialized,... " - see below. > > I know i'm probably not supposed to use a hash like this but it does > > work. I either need another "error free" way

RE: counting the recurrence of lines - du-oh,...

2002-02-02 Thread Wagner-David
You could add: if ( ! defined $saveNum{$dup} ) { $saveNum{$dup} = 0; } Also replace $saveNum{$dup} =$saveNum{$dup}+1 with $saveNum{$dup}++ Wags ;) -Original Message- From: david wright [mailto:[EMAIL PR

counting the recurrence of lines - du-oh,...

2002-02-02 Thread david wright
I'm trying to count the recurrence of lines in a file. This works how i want but first it prints "Use of uninitialized,... " - see below. I know i'm probably not supposed to use a hash like this but it does work. I either need another "error free" way to do this or a fix. I have figures

Re: one question to end the day on . . .

2002-02-02 Thread david wright
Timothy B wrote: "Hello out there - I have learned a lot of Perl today, but I am still trying to figure one more thing out. How can I go through a file and extract all the text between certain delimiters - for example I have: Bilbo, "Why I like rings" Freemont Press, 1998. Frodo, "Why I don't" B

counting the recurrence of lines - du-oh,...

2002-02-02 Thread david wright
> > I'm trying to count the recurrence of lines in a file. This works > how i want but first it prints "Use of uninitialized,... " - see below. > I know i'm probably not supposed to use a hash like this but it does > work. I either need another "error free" way to do this or a fix. I > h

Re: Perl FAQ

2002-02-02 Thread Brett W. McCoy
On Sat, 2 Feb 2002, Dave Benware wrote: > This is not a newsgroup, it's an email discussion list. It's also accessible via nntp.perl.org as a newsgroup. > The *list* doesn't have a FAQ of it's own although there has been a bit of > talk regarding creating one. And a few of us have created help

Re: Perl FAQ

2002-02-02 Thread Dave Benware
Russ Foster wrote: > > Speaking of FAQs, is there a Perl FAQ...maybe something from this newsgroup? > This is not a newsgroup, it's an email discussion list. The *list* doesn't have a FAQ of it's own although there has been a bit of talk regarding creating one. And a few of us have created he

Re: Hash Question

2002-02-02 Thread Dave Benware
"McCollum, Frank" wrote: > > Where might one find this 'tutorial'? heh, can't believe I wrote all that and didn't put in the URL duh. http://pureperl.org/hashofhash.html Bompa "McCollum, Frank" wrote: > > Where might one find this 'tutorial'? > > -Original Message- > From: Dave B

RE: Hash Question

2002-02-02 Thread Chas Owens
Okay, I came up with two solutions. The first is to use eval to build the hash and recursive functions to deal with it. The second takes up more space, but is easier to deal with: cat the keys together. The first is better when you have many things that are going to be the same and the key size

Re: Perl trainer requests beginner help

2002-02-02 Thread Michael R. Wolf
[EMAIL PROTECTED] (Peter Scott) writes: > At 01:15 AM 2/2/2002 -0500, Michael R. Wolf wrote: > > >I don't usually give quizes at the end of class, but a > >client of mine has requested it. (Required it in fact. No > >test, no payment!) > >[snip] > > | Sigils and data types | >

RE: Dates in file or directory names ?

2002-02-02 Thread Timothy Johnson
Or you can just use localtime(); ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(); my $date = ($year + 1900).($mon + 1).$mday; mkdir($date); -Original Message- From: Dave Cross To: [EMAIL PROTECTED] Sent: 2/2/02 1:01 AM Subject: Re: Dates in file or directory names

Re: Perl trainer requests beginner help

2002-02-02 Thread Paul Johnson
On Sat, Feb 02, 2002 at 01:15:16AM -0500, Michael R. Wolf wrote: > == >| Hash iteration | > == > > > %aphorism = ( > roses => red, >

Re: Perl trainer requests beginner help

2002-02-02 Thread Paul Johnson
On Sat, Feb 02, 2002 at 04:10:58AM -0800, John W. Krahn wrote: > "Michael R. Wolf" wrote: > > Any value that is not false is true. What 3 values indicate > > false? > > > Are you sure there are only three? :-) > > $ perl -le' > print qq(undef is FALSE) unless undef; > print qq("" is FALSE)

Re: Perl trainer requests beginner help

2002-02-02 Thread Peter Scott
At 01:15 AM 2/2/2002 -0500, Michael R. Wolf wrote: >I don't usually give quizes at the end of class, but a >client of mine has requested it. (Required it in fact. No >test, no payment!) >[snip] > | Sigils and data types | >[snip] > > * _ You're teaching typegl

What is most effecient method for multiple emails?

2002-02-02 Thread Jones, Mark
I want my members area script to provide the capability of sending email to every address in the MySQL database--say 1000 addresses. I'm planning to just write a loop that reads each record and sends the email to the address. Or, is there a way that is more efficient for the server, such as o

RE: quick sort --help me

2002-02-02 Thread Bob Showalter
> -Original Message- > From: Andrea Holstein [mailto:[EMAIL PROTECTED]] > Sent: Saturday, February 02, 2002 6:14 AM > To: [EMAIL PROTECTED] > Subject: Re: quick sort --help me > > ... > Perlish: print "Enter the $_ number", $a[$_-1] = for (1 .. 4); Note that the assignment is seen as a

RE: still not catching error

2002-02-02 Thread Bob Showalter
> -Original Message- > From: Roger C Haslock [mailto:[EMAIL PROTECTED]] > Sent: Saturday, February 02, 2002 5:43 AM > To: Bob Showalter; 'Alex Harris'; [EMAIL PROTECTED] > Subject: Re: still not catching error > > > You are testing the exit status of the system call, not the > exit stat

Re: Question: Interpolation in Strings

2002-02-02 Thread Jeff 'japhy' Pinyan
On Feb 2, G. E. said: >As I' ve read in "Programming Perl", double-quoted strings are subject to >variable interpolation of scalars and list values. Nothing else >interpolates. >So the following perl code won't compile: > > $st = "!--- &get_header("Users")---!"; You have quotes inside of

Re: error messages

2002-02-02 Thread Jonathan E. Paton
> Hi, > > I am executing a system command through a Perl script. > As of now if the system command succeeds it goes to > the output file and if the command fails it does not. > > Is there anyway of piping error messages also to the > output file if the command does not execute properly? system

Re: translation of logical operators

2002-02-02 Thread Jonathan E. Paton
--- Filson <[EMAIL PROTECTED]> wrote: > Dear perl mongers. I need to know if I can translate > symbols in a text file into logical operators like > AND|OR|NOT and so forth. The thing is that I'm trying to > build a simulator for digital cuircuts, with input files > in 3DML style (ascii graphix st

Re: Question: Interpolation in Strings

2002-02-02 Thread John W. Krahn
"G. E." wrote: > > As I' ve read in "Programming Perl", double-quoted strings are subject to > variable interpolation of scalars and list values. Nothing else > interpolates. > So the following perl code won't compile: > > $st = "!--- &get_header("Users")---!"; > > sub get_heade

Question: Interpolation in Strings

2002-02-02 Thread G. E.
As I' ve read in "Programming Perl", double-quoted strings are subject to variable interpolation of scalars and list values. Nothing else interpolates. So the following perl code won't compile: $st = "!--- &get_header("Users")---!"; sub get_header{ $hnd-

Re: testing for a dir

2002-02-02 Thread Jonathan E. Paton
--- Alex Harris <[EMAIL PROTECTED]> wrote: > > What is the best way, using rsh, to test if a directory > exists on another server? > Don't use rsh, it writes passwords on the back of postcards and posts it to every employee in the building, possibily outside it too. Or in other words: rsh DOE

Re: Writing to Multiple Files

2002-02-02 Thread Jonathan E. Paton
--- Aaron White <[EMAIL PROTECTED]> wrote: > Does anyone know the best way to write a really long > form into two seperate flat files, which then can be > polled using a generated ID# into HTML? I suggest you read up on packages, which should allow you to split the program into logical sections.

Re: Perl trainer requests beginner help

2002-02-02 Thread John W. Krahn
"Michael R. Wolf" wrote: > > I'd like a few volunteers to take a test that I've put > together for an "Introduction to Perl" class that I teach. > If you are a beginner or recent "graduate" of an intro > course and have a few minutes, would you time yourself > taking this test and send me the res

Re: Mucking around with txt and arrays

2002-02-02 Thread Briac Pilpré
On Fri, 01 Feb 2002 18:52:18 -0500, Steven Rubin <[EMAIL PROTECTED]> wrote: > Create a script that formats a txt file into html. Well, that's > kinda vague. I mean... If the text files looks like the one you have below, with entries separated by blank lines, here's a rough outline of what you

Re: quick sort --help me

2002-02-02 Thread Andrea Holstein
In article <[EMAIL PROTECTED]> wrote "Sanilkumar" <[EMAIL PROTECTED]>: > this program is not working please help me Sorry, I couldn't find the error instantly. But perhaps I can help you to improve your programming style. 1. Give your variables names that explain themselves. Readability co

Re: files

2002-02-02 Thread Andrea Holstein
In article <[EMAIL PROTECTED]> wrote "P0r0ng" <[EMAIL PROTECTED]>: > hi list. > supposing i have a directory containing these files: nat_10-full.xml.afp >nat_10.xml.afp > nat_1-full.xml.afpnat_1.xml.afp > nat_2-full.xmlnat_2.xml > nat_3-full.xmlnat_3.xm

Re: Mucking around in txt with arrays

2002-02-02 Thread Andrea Holstein
In article <[EMAIL PROTECTED]> wrote "Steven Rubin" <[EMAIL PROTECTED]>: > I'm a newbie, I just finished the Visual Quickstart Guide. I want to know, can >anyone give me an > out line of how I'd do this: Create a script that formats a txt file into html. >Well, that's > kinda vague. I mean..

Re: DATABASE query

2002-02-02 Thread nafiseh saberi
hi. my guide to you depend on that, you run it in shell or through cgi ?? explian more.. __ Try to have simple habits, deep thoughts . _ Hi, I'm trying to execute a SQL statement asking three tables on a DBI database connection. The

DATABASE query

2002-02-02 Thread mb
Hi, I'm trying to execute a SQL statement asking three tables on a DBI database connection. The database is a commertiale one (diff from MySQL) I think that my SQL statement is right : my($stmt) = "select AS_QteSto from art F_ARTICLE,dep F_DEPOT,sto F_ARTSTOCK where art.AR_Ref='

Re: still not catching error

2002-02-02 Thread Roger C Haslock
You are testing the exit status of the system call, not the exit status of the rsh call which is in $?. You need $systemstatus=system(...); $rshstatus=$?; - Roger - - Original Message - From: "Bob Showalter" <[EMAIL PROTECTED]> To: "'Alex Harris'" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]

Re: Dates in file or directory names ?

2002-02-02 Thread Dave Cross
On Thu, 31 Jan 2002 21:20:16 +, Mark Richmond wrote: > Ok, so I'm confused > What I want to do is create a directory where the name is the current > date say mkdir(2002131) > What Can't figure out is how to build the date string. I'm sure I'm > just missing something. > Any thoughts. [can yo

Re: Perl trainer requests beginner help

2002-02-02 Thread sfritz
1:23am > > Unless otherwise directed, fill in the blank. > > == >| Sigils and data types | > == > > Sigil Variable type > = ==

Mucking around with txt and arrays

2002-02-02 Thread Steven Rubin
I'm a newbie, I just finished the Visual Quickstart Guide. I want to know, can anyone give me an out line of how I'd do this: Create a script that formats a txt file into html. Well, that's kinda vague. I mean... Example: text file contains: Steven http://blah.com Web design and basketball US

error messages

2002-02-02 Thread srinivas krish
Hi, I am executing a system command through a Perl script. As of now if the system command succeeds it goes to the output file and if the command fails it does not. Is there anyway of piping error messages also to the output file if the command does not execute properly? PLease let me know how