Easy question

2005-07-19 Thread Neville Hodder
The following code creates two Input types - a file select and a text input. The text input data is returned as expected whilst the file select data is ignored. I have not found any references for a CGI file select form tag in my documentation so I guess it is not a recognised tag. How can I

RE: Easy question

2005-07-19 Thread Bob Showalter
Neville Hodder wrote: The following code creates two Input types - a file select and a text input. The text input data is returned as expected whilst the file select data is ignored. I have not found any references for a CGI file select form tag in my documentation so I guess it is not a

Re: Easy question

2005-07-19 Thread Ing. Branislav Gerzo
Neville Hodder [NH], on Tuesday, July 19, 2005 at 14:54 (+0100) wrote about: NH How can I achieve a returned selected filename within a simple CGI NH script? you should read more about it on excelent webpage: http://www.cs.tut.fi/~jkorpela/forms/file.html -- How do you protect mail on web? I

Re: Easy question

2005-07-19 Thread David Dorward
On Tue, Jul 19, 2005 at 02:54:13PM +0100, Neville Hodder wrote: FORM * Invalid HTML. The action attribute is required. * You haven't specified an enctype, but the default is unstuiable for use with file inputs. * You haven't specified a method, and the default (get) is unsuitable for

RE: How can we read files recursively?

2005-07-19 Thread Thomas Bätzler
Wiggins d'Anconia [EMAIL PROTECTED] wrote: Though it seems a bit odd that you want to recursively read a filehandle. It certainly would be a cool way to handle include directives when parsing config files, i.e. my $conf = /etc/apache/httpd.conf open( my $fh, $conf ) or die Can't open

OO in perl

2005-07-19 Thread Beast
Perl Object Oriented Programming is very confusing (to me at least :) --- package Test; sub new {} sub f_one{} sub f_two{} 1; --- I can call using my $test = Test-new-f_one; But why this not works? my $test = Test-new-f_one-f_two; -- --beast -- To unsubscribe, e-mail: [EMAIL

RE: OO in perl

2005-07-19 Thread Thomas Bätzler
Beast [EMAIL PROTECTED] asked: I can call using my $test = Test-new-f_one; Test-new returns an object of type Test; and so your code is equivalent to my $obj = Test-new; my $test = $obj-f_one; But why this not works? my $test = Test-new-f_one-f_two; This will work if f_one returns a

Object stuff

2005-07-19 Thread Tom Allison
I'm tring to wrap my feeble brain around some of the object stuff in general. I'm still working on it and have decided to go back to the beginning and read lots of really fine manuals before I dive into more. But I have one kind of basic question I'm trying to answer. I started with

Re: Object stuff

2005-07-19 Thread Xavier Noria
On Jul 19, 2005, at 12:12, Tom Allison wrote: I started with Mail::IMAPClient as my base. This requires a argument list of the form: %args = { Server = 'mail.somewhere.tld', User = 'rosco', Password = 'secret' }; The new() constructor receives a hash, which is

Re: OO in perl

2005-07-19 Thread Jeff 'japhy' Pinyan
On Jul 19, Beast said: package Test; sub new {} sub f_one{} sub f_two{} You've neglected to show us the contents. I'll assume that new() creates and returns an object. I'll also assume that f_one() and f_two() DO NOT return objects. my $test = Test-new-f_one; Test-new returns an

Re: reading a big file

2005-07-19 Thread Dave Adams
Can you use some sort of 'tail' command to get the last lines? DA On 7/16/05, Wiggins d'Anconia [EMAIL PROTECTED] wrote: Octavian Rasnita wrote: Hi, I need to create a program which reads a file from the LAN, and that file is continuously updated (kind of log). The file increases

Re: Object persistence

2005-07-19 Thread Scott R. Godin
Jeff, Thanks again for your time and assistance thus far with helping me to visualise this. :) Another thought has occurred to me as well, with regards to Subscriber::DB : one of the client requests is to be able to extract the database, or portions of the database to a CSV style format.

Re: reading a big file

2005-07-19 Thread Mailing Lists
Slightly off topic but.. I dont know if this possible with your situation, but it may make more sense to put the growing file into a database and write reports out of the database that extract the needed data. Just a thought from a different point of view. On 7/15/05, Octavian Rasnita [EMAIL

Re: catching signal for an email notification

2005-07-19 Thread MNibble
[EMAIL PROTECTED] wrote: Perl'ers I my code I wrote a routine that executes return code signals. My point being is if after any particular line of code make a call to check its success or failure. My question is if after any code system call or non system call failure according to $? == -1 ?

Re: Object persistence

2005-07-19 Thread Jeff 'japhy' Pinyan
On Jul 18, Scott R. Godin said: So, there will be instances where only one user will be handled, and instances where we'll be sifting through all the users for specific data (email, snailmail, birthday, anniversary) I'm leaning towards (per your comments above) the Subscriber::DB holding the

Re: Object persistence

2005-07-19 Thread Jeff 'japhy' Pinyan
On Jul 19, Scott R. Godin said: I'd LIKE to be able to (I think) inherit from Subscriber::DB somehow for a Subscriber::DB::CSV such that I can take the filtered request and retrieve/output CSV-formatted records from the database.. I've already produced the code to do so in another

Problems getting current time

2005-07-19 Thread Dave Adams
I can get date but not time. use Time::localtime; $tm = localtime; printf(Current date: %04d-%02d-%02d\n,$tm-year+1900,($tm-mon)+1, $tm-mday); printf(Current time: %02d:%02d:%02d\n,$tm-hours,$tm-min,$tm-sec); Any help would be appreciated. DA -- To unsubscribe, e-mail: [EMAIL PROTECTED] For

Re: Problems getting current time

2005-07-19 Thread Wiggins d'Anconia
Dave Adams wrote: I can get date but not time. use Time::localtime; $tm = localtime; printf(Current date: %04d-%02d-%02d\n,$tm-year+1900,($tm-mon)+1, $tm-mday); printf(Current time: %02d:%02d:%02d\n,$tm-hours,$tm-min,$tm-sec); The above should include $tm-hour instead of $tm-hours, but

Re: Problems getting current time

2005-07-19 Thread jm
this is what i use to get date/time; something different that may be of benefit use POSIX 'strftime'; sub timestamp { my ($sec, $min, $hour, $mday, $mon, $year, $wday, $yday, $isdst) = localtime; my $am_pm = $hour 11 ? PM : AM; $year +=

Re: Problems getting current time

2005-07-19 Thread Dave Adams
You are right. I thought it was something more because I got an error: Can't locate object method hours via package Time::tm (perhaps you forgot to load Time::tm?) at ./GetDate.pl line 4. I was also using the Orielly Perl CookBook 2nd Edition and it specifies $hours and not $hour. This is

Re: escaping @

2005-07-19 Thread Charles Farinella
On Mon, 2005-07-18 at 11:53, Wiggins d'Anconia wrote: I had to add a 'chomp' and make sure the line endings in my file were correct, but this worked and I learned something useful as well. Thank you. :-) --charlie Only do things in the loop that must be done in the loop. Reconnecting,

Re: Problems getting current time

2005-07-19 Thread Jay Savage
On 7/19/05, Dave Adams [EMAIL PROTECTED] wrote: You are right. I thought it was something more because I got an error: Can't locate object method hours via package Time::tm (perhaps you forgot to load Time::tm?) at ./GetDate.pl line 4. I was also using the Orielly Perl CookBook 2nd

Re: catching signal for an email notification

2005-07-19 Thread DBSMITH
MNibble [EMAIL PROTECTED] de

convert array pair to hash

2005-07-19 Thread Robert Citek
Is there an easier, more compact way to convert two arrays, on with keys and the other with values, into a hash? I have this sample code: 1 #!/usr/local/bin/perl -w 2 3 my $hash ; 4 my @keys =qw(col1 col2 col3); 5 @vals=qw(a b c); 6 for ($i=0; $i=2 ; $i++)

Re: convert array pair to hash

2005-07-19 Thread Wiggins d'Anconia
Robert Citek wrote: Is there an easier, more compact way to convert two arrays, on with keys and the other with values, into a hash? I have this sample code: 1 #!/usr/local/bin/perl -w 2 3 my $hash ; 4 my @keys =qw(col1 col2 col3); 5 @vals=qw(a b c);

Re: convert array pair to hash

2005-07-19 Thread Wiggins d'Anconia
Robert Citek wrote: On Jul 19, 2005, at 5:19 PM, Wiggins d'Anconia wrote: Close. You want a hash slice. @[EMAIL PROTECTED] = @vals; A marvelously Perlish construct. http://danconia.org Swet! Thanks a bunch. Do you have a good reference which explains this? I've looked in

Re: Object stuff

2005-07-19 Thread Tom Allison
Xavier Noria wrote: On Jul 19, 2005, at 12:12, Tom Allison wrote: I started with Mail::IMAPClient as my base. This requires a argument list of the form: %args = { Server = 'mail.somewhere.tld', User = 'rosco', Password = 'secret' }; The new() constructor receives a

Queue Management Tools

2005-07-19 Thread Tom Allison
I'm looking for a file based management tool that can handle two different scenarios. The first is a collection of simple strings in FIFO order. The number of strings is large: 10^6 to 10^8. One option was to use Tie and a Berkeley database, but these tend to get rather large quickly. I was