From: Luke [EMAIL PROTECTED]
Hello,
I am looking for a proper, fastest and most reasonable way to insert
data from pretty big file (~1,000,000 lines) to database. I am using
Win32::ODBC (ActiveState Perl) module to connect with Access/MSSQL
database and inserting line after line. I was
First of all, you should try and use the database native tools for loading
tables this size...
If it has to be perl which does happen sometimes, you should definetly
switch of autocommit. Try doing a commit every 5 lines or even every
10 lines (ask your friendly DBA how big the
Hello All,
I'm having a problem with modperl and I can't figure out if it's my
stupiditry or modperls'. I'd love somebody with some modperl foo to
give me a hand.
First, the config:
rembox# cat /etc/redhat-release
Red Hat Enterprise Linux ES release 4 (Nahant Update 4)
rembox# rpm -qa |
On Mon, 2007-09-24 at 05:13 +0530, Somu wrote:
Thanks for the help. I did it using
system tasklist temp;
open FH , temp ;
statements..
unlink (temp); #EOF
Consider this code snippet then, does this in one step. I am writing
the output to a log only you can put all the logic into the
Hi,
I used the code:
sub set_min{
$host = shift;
$date = shift;
print The host is $host and the date is $date\nIn the function
set_min\n;
$host = SOX::get_db_host();
$user = SOX::get_db_user();
$passwd = SOX::get_db_passwd();
I haven't dealt with MS databases in several years but some of this
stuff will likely still apply. First a couple notes on the underlying
databases, if you're running Access be sure to compact the database
after the insert particularly if this is going to be a repeated process,
in addition to
Ken Foskey wrote:
On Mon, 2007-09-24 at 05:13 +0530, Somu wrote:
Thanks for the help. I did it using
system tasklist temp;
open FH , temp ;
statements..
unlink (temp); #EOF
Consider this code snippet then, does this in one step. I am writing
the output to a log only you can put all the
Great! Thanks.. How about using untie instead of close? Can i know ,
phat is the difference between the two?
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/
What does it mean? AFAIK? I have seeing it a lot.. Earlier i've been
seeing the HTH, and a guess gave the answer.. But this one, AFAIK...
Are there any more such short forms?
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/
You have two $host variables, the one passed as the parameter will be
overwritten by the SOX function which returns the DB host name used for
connection. In the Update query that would remain constant for whatever
database you connected to. I'm guessing the problem is that you want
separate
On 9/24/07, kapil.V [EMAIL PROTECTED] wrote:
snip
my $insert_query = qq{
UPDATE hosts SET last_checked = '$date' WHERE hostname =
'$host';
};
$sth = $db - prepare($insert_query)
or die Could not prepare the statement: .$db - errstr;;
Is there a way to test for values where zero is valid?
For instance:
%a_Hash;
$a_hash{user_id} = 0;
$a_hash{user_name} = root if ($a_hash{user_id});
print $a_hash{user_id} if ($a_hash{user_id});
print $a_hash{user_name} if ($a_hash{user_name});
Sometimes the user_id can be undef. As a result,
It appears as though the user method only returns a value after
successful authentication while you're trying to get it before.
George wrote:
Hello All,
I'm having a problem with modperl and I can't figure out if it's my
stupiditry or modperls'. I'd love somebody with some modperl foo to
Hi,
I found the answer on another perl mongers list.
I needed to swap the user and passwd. $r-user isn't available until
after $r-get_basic_auth_pw has been called.
Cheers!
George
Matthew Whipple wrote:
It appears as though the user method only returns a value after
successful
untie or unlink? You had used unlink previously which closed and
deleted a temporary file while close only closes the file which would be
the proper way to terminate a pipe such as used in the solution.
Somu wrote:
Great! Thanks.. How about using untie instead of close? Can i know ,
phat is
-Original Message-
From: Somu [mailto:[EMAIL PROTECTED]
Sent: Monday, September 24, 2007 09:42
To: Beginners@perl.org
Subject: AFAIK
What does it mean? AFAIK? I have seeing it a lot.. Earlier i've been
seeing the HTH, and a guess gave the answer.. But this one, AFAIK...
Are
On 9/24/07, Somu [EMAIL PROTECTED] wrote:
What does it mean? AFAIK? I have seeing it a lot.. Earlier i've been
seeing the HTH, and a guess gave the answer.. But this one, AFAIK...
Are there any more such short forms?
HTH -- hope that helps
AFAIK -- as far as I know
IIRC -- if I remember
Hi:
How can I use perl to do the following -
--Look for a file on a filesystem containing a string such as
Product Name 1.0.0.0.0
--Then get the disk location path of the file and store the path in a variable.
--Pass the variable to an external java program.
Thanks a lot!
--
To unsubscribe,
Somu wrote:
What does it mean? AFAIK?
As Far As I Know
I have seeing it a lot.. Earlier i've been
seeing the HTH, and a guess gave the answer.. But this one, AFAIK...
Are there any more such short forms?
http://www.geocities.com/eedd88/abbreviations.html?200724
John
--
Perl isn't a
George schreef:
I'm having a problem with modperl and I can't figure out if it's my
stupiditry or modperls'. I'd love somebody with some modperl foo to
give me a hand.
See
http://london.pm.org/pipermail/london.pm/Week-of-Mon-20070924/010069.html
--
Affijn, Ruud
Gewoon is een tijger
Somu wrote:
What does it mean? AFAIK? I have seeing it a lot.. Earlier i've been
seeing the HTH, and a guess gave the answer.. But this one, AFAIK...
Are there any more such short forms?
http://www.google.com/
--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl
--
To
On Sep 24, 2:48 am, [EMAIL PROTECTED] (kapil.V) wrote:
Hi,
I used the code:
sub set_min{
$host = shift;
$date = shift;
Here you set $host and $date to be two parameters passed into your
set_min function.
print The host is $host and the date is
defined()
Zachary Shay wrote:
Is there a way to test for values where zero is valid?
For instance:
%a_Hash;
$a_hash{user_id} = 0;
$a_hash{user_name} = root if ($a_hash{user_id});
print $a_hash{user_id} if ($a_hash{user_id});
print $a_hash{user_name} if ($a_hash{user_name});
Sometimes
-Original Message-
From: Zachary Shay [mailto:[EMAIL PROTECTED]
Sent: Monday, September 24, 2007 11:04
To: beginners@perl.org
Subject: How to test for 0
Is there a way to test for values where zero is valid?
For instance:
%a_Hash;
$a_hash{user_id} = 0;
$a_hash{user_name} =
Zachary Shay wrote:
Is there a way to test for values where zero is valid?
For instance:
%a_Hash;
$a_hash{user_id} = 0;
$a_hash{user_name} = root if ($a_hash{user_id});
print $a_hash{user_id} if ($a_hash{user_id});
print $a_hash{user_name} if ($a_hash{user_name});
Sometimes the user_id can
On 9/24/07, Zachary Shay [EMAIL PROTECTED] wrote:
Is there a way to test for values where zero is valid?
For instance:
%a_Hash;
$a_hash{user_id} = 0;
$a_hash{user_name} = root if ($a_hash{user_id});
print $a_hash{user_id} if ($a_hash{user_id});
print $a_hash{user_name} if
Thanks for all the responses guys. I have rewritten my code with defined,
and that appears to be exactly was I was looking for.
Thanks,
Zach
way to test
these values so that only undef will return as false?
Thanks,
Zach
Hi,
AFAIK = as far as i know
HTH = hope that helps
HTH! ;)
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/
Hi
you can test if something is defined with
if( defined( $var ) )
( in addition: for hashs there is also exists() )
HTH Martin
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/
I knew LOL from wap chatting.. IMHO, its a gud way to write things.
TIMTOWTWI - there is more than one way to write it!
TDH - That Definitely Helped! Thanks all..
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/
Date sent: Mon, 24 Sep 2007 22:11:44 +0530
From: Somu [EMAIL PROTECTED]
Send reply to: [EMAIL PROTECTED]
To: Beginners@perl.org
Subject:AFAIK
What does it mean? AFAIK? I have seeing it a lot.. Earlier i've been
seeing
I meant
untie $process ;
instead of the close function. In the docs, it says untie is better
than close. Why is it so? I only use untie while closing perl database
hashes..
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/
Inexplicit tests, eg `if ($var)`, will not differentiate between undef and 0.
However, you should be able to explicitly test for either 0 or undef.
for (0, undef, 1) {
print [$_] is true\n if ($_);
print [$_] is false\n if (not $_);
print [$_] is 0\n if ($_ eq 0);
print [$_] is undef\n if
As far as I know.
Some links for you to explore:
http://www.urbandictionary.com/
http://www.acronymfinder.com/
http://acronyms.thefreedictionary.com/
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/
Zachary Shay wrote:
Is there a way to test for values where zero is valid?
For instance:
%a_Hash;
$a_hash{user_id} = 0;
$a_hash{user_name} = root if ($a_hash{user_id});
print $a_hash{user_id} if ($a_hash{user_id});
print $a_hash{user_name} if ($a_hash{user_name});
Sometimes the user_id can
perldoc -funtie
or more thoroughly perldoc perltie
untie is the way to go if you're dealing with a tied variable...if
you're not then it won't do anything (or at least it shouldn't). The
perltie doc will also hint at the greater range of tie'ing available
above database hashes.
Somu wrote:
I
36 matches
Mail list logo