Re: Perl DBI / SQL Question

2005-09-15 Thread Vance M. Allen
I use MySQL 4.1.7 under Fedora Core 3. Vance Bob Showalter [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Vance M. Allen wrote: I need to know how to retrieve through Perl DBI a listing of possible ENUM elements from a field for processing under a CGI script. Need to know what

Re: Perl DBI / SQL Question

2005-09-15 Thread Sean Davis
On 9/14/05 8:32 PM, Vance M. Allen [EMAIL PROTECTED] wrote: I use MySQL 4.1.7 under Fedora Core 3. Vance Bob Showalter [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Vance M. Allen wrote: I need to know how to retrieve through Perl DBI a listing of possible ENUM elements

RE: Use of uninitialized value

2005-09-15 Thread DBSMITH
Charles K. Clarkson [EMAIL PROTECTED]

cookies as hidden files

2005-09-15 Thread Denzil Kruse
Hi all, I read through the docs for CGI::Cookie and learned how to set a cookie. I do it with line: my $cookie = new CGI::Cookie(-name='name', -value=$name, -expires='+6M'); But, I've found out that when IE creates the cookie, it

Re: Problem reading data from an HTML file

2005-09-15 Thread Suvajit Sengupta
Nath, Alok (STSD) wrote: Can anyone point out why it is not outputting anything ? It is suppose to read an HTML file and display the table contents. One thing I observed is - It is not entering the for loop and I s not printing anything ( in print Table found at , join(',', $ts-coords),

module and a class?????

2005-09-15 Thread Jabir Ahmed
hello can anyone tell me the basic difference between a module and a class in perl. i would be glad if you could give a brief example.; thanks jabir I do the diffcult immediately,but the impossible take's a little longer!!! Cresent canaopy apartments #19 Davis Road, Thomas town,

spreadsheets to ldif (trouble looping through array)..

2005-09-15 Thread Harold Castro
Good day! I'm about to transfer our ip allocation table from openoffice spreadsheet into an ldif format. The spreadsheet has 19 columns, some cells are empty though. So far this is what I got: #!/usr/local/bin/perl use warnings; use strict; my $input = shift @ARGV; my $output = shift @ARGV; our

how do I know if it's an array?

2005-09-15 Thread Ryan Perry
I have 2 set of options on a web page. first some radios (scalar), then some check boxes (array). How will I know if I have an array or not? Thanks! -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: Problem with uninitialized char.

2005-09-15 Thread John Doe
John W. Krahn wrote: Condor wrote: Hello, Hello, i have problem with uninitialised char and i don't know how to resolve a problem. I will paste part of code: #!/usr/bin/perl use strict; use warnings; use diagnostics; my $temp_buf = 0; my @buffer = (); my $all = 255; my

Re: Comparing file contents (code included)

2005-09-15 Thread Chris Devers
On Wed, 14 Sep 2005, Jenny Chen wrote: Please unsubscrib me from the list. Thanks. Jenny Chen -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ http://learn.perl.org/first-response Hmm... How does one go about

Re: how do I know if it's an array?

2005-09-15 Thread Jeff 'japhy' Pinyan
On Sep 14, Ryan Perry said: I have 2 set of options on a web page. first some radios (scalar), then some check boxes (array). How will I know if I have an array or not? If you're using a competant CGI query parser, like CGI.pm that comes with Perl, then you can simply do:

Re: spreadsheets to ldif (trouble looping through array)..

2005-09-15 Thread John W. Krahn
Harold Castro wrote: Good day! Hello, I'm about to transfer our ip allocation table from openoffice spreadsheet into an ldif format. The spreadsheet has 19 columns, some cells are empty though. So far this is what I got: #!/usr/local/bin/perl use warnings; use strict; my $input =

RE: module and a class?????

2005-09-15 Thread Bakken, Luke
Jabir Ahmed wrote: hello can anyone tell me the basic difference between a module and a class in perl. i would be glad if you could give a brief example.; thanks jabir perldoc perlboot -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

keep entity references while parsing with XML::Parser

2005-09-15 Thread Alois Heuboeck
Hi Perlers, I'm trying to do the following: 1- take an XML file 2- in one script, replace everything above Unicode #x7F (end of ASCII) with entity references (which can either have special names, like auml; or be based on the Unicode nb. like #x00AE;) 3- then in another script, do some

RE: extract web pages from a web site

2005-09-15 Thread Siegfried Heintze
I recommend Lincoln Stein's book Perl Networking. Even if you are too cheap to buy his book, you can google for it and download the source code for an example program that uses HTML::Parser to extract and download all the gif files from a page. His example actually parses the HTML and it sounds

Assistance needed with script.......

2005-09-15 Thread Bryan Jones
Hello all, I am somewhat new to perl. I have tried to read everything that I can. I have a somewhat simple script, so might think. I have attached the script and the file that I am reading to gather the data. I am trying to parse this file to gather information and from here I will import the

Question about data storage

2005-09-15 Thread Peter Rabbitson
Hello perlers, This is somewhat of a database related question, but it is as much related to programming practices, so excuse me if this is not the apporpriate list. I am collecting and processing online orders from several different sources. Each source is queried periodically, information

Problem with package

2005-09-15 Thread Luinrandir
package Inn; BEGIN {} END {} return 1; An error comes up when I include the END{} but not the BEGIN{} any clues? -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ http://learn.perl.org/first-response

RE: Question about data storage

2005-09-15 Thread Walter Hunnel
Not perl, but as a DBA: Some possibilities (I am sure there are others) Make the fields large enough to hold any expected bogus data. Accept ANYTHING submitted and store in the database (possibly as character data). Have a column that is a 'dirty' flag, set it to (for example) 1 for ALL incoming

Re: Question about data storage

2005-09-15 Thread Peter Rabbitson
On Thu, Sep 15, 2005 at 04:57:28PM -0500, Walter Hunnel wrote: Not perl, but as a DBA: Thanks for answering! Unless you are getting the data as XML or have to change the data to XML for some other reason, I would not move to XML just for the cleanup you are asking about. I was

Why is my package executing everything!

2005-09-15 Thread Luinrandir
My package is executing ALL subroutines when required? why? -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ http://learn.perl.org/first-response

RE: Why is my package executing everything!

2005-09-15 Thread Timothy Johnson
Are you calling the subroutines in your package, or just defining them? For example, do you have anything like this inside your package? FooSub(); sub FooSub{ my $bar = 21; print BlackJack!\n; } -Original Message- From:

Re: Problem with package

2005-09-15 Thread Bob Showalter
Luinrandir wrote: package Inn; BEGIN {} END {} return 1; An error comes up when I include the END{} but not the BEGIN{} any clues? Er, WTF are you trying to do? What is the error? You can't use return outside of a sub. The normal idiom is a bare 1 to provide a true result for

Re: Why is my package executing everything!

2005-09-15 Thread Bob Showalter
Luinrandir wrote: My package is executing ALL subroutines when required? why? Since you don't show us your code, how on earth are we supposed to guess? -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: Question about data storage

2005-09-15 Thread Bob Showalter
Peter Rabbitson wrote: * I store dirty orders as XML in a SQL table with 2 columns - one for the order id and another for the arbitrary XML structure. Problem once again is that my XML can be thousands of characters long. I vote for this option. You can use a TEXT or MEDIUMTEXT column to store

Re: spreadsheets to ldif (trouble looping through array)..

2005-09-15 Thread Harold Castro
Hi John! --- John W. Krahn [EMAIL PROTECTED] wrote: Here is one way to do it: my @array = qw( favorite lessfavorite worstfavorite ); while ( DATA ) { chomp; my @fields = map length() ? $_ : 'NA', split /:/, $_, -1; next unless @fields == @array; my %pairs;

Re: Question about data storage

2005-09-15 Thread Jay Savage
On 9/15/05, Bob Showalter [EMAIL PROTECTED] wrote: Peter Rabbitson wrote: * I store dirty orders as XML in a SQL table with 2 columns - one for the order id and another for the arbitrary XML structure. Problem once again is that my XML can be thousands of characters long. I vote for this

RE: Problem with package

2005-09-15 Thread Charles K. Clarkson
Luinrandir mailto:[EMAIL PROTECTED] wrote: : package Inn; : : BEGIN : {} : : END : {} : : return 1; : : : An error comes up when I include the END{} but not the BEGIN{} Which error are you getting? I don't get any errors. In './Inn.pm': package Inn; BEGIN{} END {} return 1;

Re: Problem with package

2005-09-15 Thread Luinrandir
there must be a problem with my web host. cause now I can't even run the program. Lou - Original Message - From: Charles K. Clarkson [EMAIL PROTECTED] To: beginners@perl.org Sent: Thursday, September 15, 2005 6:49 PM Subject: RE: Problem with package Luinrandir mailto:[EMAIL

Re: Problem with package

2005-09-15 Thread Bob Showalter
Bob Showalter wrote: You can't use return outside of a sub. The normal idiom is a bare 1 to provide a true result for require(). I'm wrong. You _can_ return from a do FILE construct. So there shouldn't be an error. (suggest you remove the return anyway; it isn't normally used in that