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 t
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
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 t
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
both the Camel and Llama books
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
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++)
MNibble
<[EMAIL PROTECTED]
de>
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 Per
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,
> repr
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
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 +
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
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
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 command-li
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
[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
? &
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 PR
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.
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 in
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
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 initi
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 Mail::I
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_
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: [E
24 matches
Mail list logo