|my $two_weeks_ago_iso = strftime '%Y-%m-%d %T', localtime $two_weeks_ago;
Sigh. After the appropriate "use POSIX qw( strftime );" of course.
t.
Kris --
Note that this isn't strictly a perl nor dbi question. Haing said
that, the most efficient way is probably to calculate the expiration
time local to the perl script, then compare that constant against the
db field. That is:
|my $now = time();
|my $two_weeks_ago = $now - 14*24*6
> "Roderick" == Roderick A Anderson <[EMAIL PROTECTED]> writes:
[from previous message]
Roderick> The problem I'm having is how to do in a one-liner the
Roderick> equivalent of this. Getting the the $domainname_key out of
Roderick> the arrayref $domain_array.
Roderick> foreach my $row (@$do
> "Elio" == Elio Grieco <[EMAIL PROTECTED]> writes:
Elio> I finally noticed that in all the places where no rows were returned I
Elio> had used a here document to store the SQL in a variable before passing
Elio> it to DBI. Does anyone know why using a here document would result in
Elio> the SQ
> "Chad" == chad kellerman <[EMAIL PROTECTED]> writes:
Chad> I want to check to see if the hosts exists. IF it does update
Chad> if not insert.
Note that some databases have this functionality built-in; MySQL has a
REPLACE primitive that does exactly this.
In other databases, I typically t
> "Glen" == Glen Eustace <[EMAIL PROTECTED]> writes:
Glen> I am not having much success at getting a Stack Trace.
It's not quite as useful, but you might also try using 'strace' or
'truss' or its equivalent on your system -- if nothing else, it should
tell you what your program tried to do r
> "Joe" == Joe Slagel <[EMAIL PROTECTED]> writes:
Joe> We're seeing some very odd behavior with using alarm() around the
Joe> DBI->connect() call only on Solaris platforms. It appears that
Joe> even though we clear the alarm after a successful connection, for
Joe> some reason the alarm signa