|
|
Up |
|
|
  |
Author: anjuanju
Date: Jul 26, 2006 22:24
Hi ,
My script is making connection to the four databases one by one and
writing the output to a single excelsheet. But there being huge
records, its taking too much time ( 4 hours), which is not acceptable.
So I need to synchronise the process so that the connection is made to
all the 4 DBs at one time and they run parallely.
I tried using Perl threads/ ithreads for the same but its giving
problem, like handles can't be shared , use clone() method etc. etc.
Can you please advice how can I do the same?
Please reply ASAP.
Many Thanks in advance.
Regards,
Anju
|
| |
|
| |
3 Comments |
|
  |
Author: A. Sinan UnurA. Sinan Unur
Date: Jul 26, 2006 21:24
"A. Sinan Unur" <1usa@llenroc.ude.invalid> wrote in
news:Xns980CF1962A218asu1cornelledu@ 127.0.0.1:
>> I was hoping someone could confirm a bug for me.
>
> You have the wrong attitude. You should hope to learn something by
> asking people, instead of wanting to find a bug.
OK, I still stand by my rant, but I did some investigating:
D:\UseNet\clpmisc> cat err.pl
#!/usr/bin/perl
use strict;
use warnings;
use Error;
throw Error::Simple -text => "Oops!" if 1;
__END__
D:\UseNet\clpmisc> err
-text at D:\UseNet\clpmisc\err.pl line 8.
|
| Show full article (1.99Kb) |
|
| |
no comments
|
|
  |
Author: Ben MorrowBen Morrow
Date: Jul 26, 2006 19:30
Quoth "John W. Krahn" telus.net>:
> Terry wrote:
>> I am a few hours into my life after Perl.
>>
>> I need to rename approximately 5000 .jpg files, which I think I have
>> figured out thanks to "Learning Perl" 3rd. Ed. (pg. 176).
>>
>> Unlike that example, I would like to compare/match the file names to a
>> table/field in a csv file and once matched rename the file to the
>> second table/field in the csv file so that ABCDEFG.jpg becomes
>> 1111111.jpg and ABCDEFH.jpg becomes 1111112.jpg and so on.
>>
>> I've been searching my perldoc, comp.lang.perl.misc and "Learning Perl"
>> most of the day and haven't found anything that looks like what I want
>> to do, but I'm chalking that up to not knowing where to look.
>>
>> Any suggestions of howto: or where to look would be greatly
>> appreciated.
>
> UNTESTED: ...
|
| Show full article (1.71Kb) |
|
no comments
|
|
  |
Author: axelaxel
Date: Jul 26, 2006 19:15
Archimede Pitagorico linby.net> wrote:
> On Wed, 26 Jul 2006 23:17:34 GMT, axel@white-eagle.invalid.uk wrote:
>>Archimede Pitagorico linby.net> wrote:
>>> This code give me many errors:
>>> 1) Use of uninitialized value in numeric gt (>) ....
>>> Why? Thanks.
>>If you cannot be bothered to actually post your code, why should we
>>bother to look it up on the web?
> Sorry but I have think that long code can be a problem in newsgroups.
> :(
Long code is a problem anyway... the Posting Guidelines give guidance as
to providing the best means of receiving help.
Besides that, posting the code to the newsgroup is much less of a problem
than putting it on a web site.
- People need to start a browser to view the code instead of just
reading it in context with the problem.
|
| Show full article (1.60Kb) |
|
no comments
|
|
  |
Author: PerlFAQ ServerPerlFAQ Server
Date: Jul 26, 2006 18:03
This is an excerpt from the latest version perlfaq4.pod, which
comes with the standard Perl distribution. These postings aim to
reduce the number of repeated questions as well as allow the community
to review and update the answers. The latest version of the complete
perlfaq is at http://faq.perl.org .
--------------------------------------------------------------------
4.49: How do I process/modify each element of an array?
Use "for"/"foreach":
for (@lines) {
s/foo/bar/; # change that word
tr/XZ/ZX/; # swap those letters
}
Here's another; let's compute spherical volumes:
for (@volumes = @radii) { # @volumes has changed parts
$_ **= 3;
$_ *= (4/3) * 3.14159; # this will be constant folded
}
which can also be done with "map()" which is made to transform one list
into another:
|
| Show full article (2.25Kb) |
|
no comments
|
|
  |
Author: vfoleyvfoley
Date: Jul 26, 2006 17:16
Hello,
I am a new Perl programmer and I would need some help with CPAN
modules. During the configuration part of CPAN, I asked that the
modules be installed in ~/perl. This gave me a directory structure,
however I am not sure which directory/ies I should put in my PERL5LIB
variable. This is the current setup:
|
| Show full article (0.93Kb) |
|
no comments
|
|
  |
Author: Tad McClellanTad McClellan
Date: Jul 26, 2006 16:30
Tad McClellan augustmail.com> wrote:
> Jack yahoo.com> wrote:
>
>> I want to exclude
>> from the counting any null values,
>
>> sub uniques
>> {
>> my %%unique = ();
>> if (@_ != /^\z/) { $unique{$_}++ foreach @_ } ;
Or, if you meant values rather than keys:
$unique{$_}++ foreach grep length, @_;
|
| Show full article (0.68Kb) |
|
no comments
|
|
  |
Author: Derek BaschDerek Basch
Date: Jul 26, 2006 16:21
Hello Everyone,
I was hoping someone could confirm a bug for me. I believe I have found
a bug in the Error module. The Synopsis section shows this example:
throw Error::Simple -text => "Oops!" if $other_condition;
However, this style of instantiating a Error::Simple object is broken.
The constructor for Error::Simple does not convert the parameters array
into a hash as expected:
265 sub new {
266 my $self = shift;
267 my $text = "" . shift;
268 my $value = shift;
269 my(@args) = ();
I believe it should be:
265 sub new {
266 my (%%params) = @_;
and the parameters should be dereferenced as hash elements throughout.
Can anyone confirm?
Thanks,
Derek Basch
|
| |
|
2 Comments |
|
  |
|
|
  |
|
|
  |
Author: TerryTerry
Date: Jul 26, 2006 13:51
I am a few hours into my life after Perl.
I need to rename approximately 5000 .jpg files, which I think I have
figured out thanks to "Learning Perl" 3rd. Ed. (pg. 176).
Unlike that example, I would like to compare/match the file names to a
table/field in a csv file and once matched rename the file to the
second table/field in the csv file so that ABCDEFG.jpg becomes
1111111.jpg and ABCDEFH.jpg becomes 1111112.jpg and so on.
I've been searching my perldoc, comp.lang.perl.misc and "Learning Perl"
most of the day and haven't found anything that looks like what I want
to do, but I'm chalking that up to not knowing where to look.
Any suggestions of howto: or where to look would be greatly
appreciated.
Thank you
Terry
|
| |
|
7 Comments |
|
|
|
|
|
|