removing qw( [ array ] ) seems to fix it?

2002-07-10 Thread Zachary Buckholz
Original:: avg_resp_time=> [ qw(@$avg_resp_time[0] @$avg_resp_time[1] @$avg_resp_time[2] @$avg_resp_time[3]

Re: more example code Re: help dereferencing arrayref so I can put the value into a hash

2002-07-10 Thread Zachary Buckholz
selectrow also Thank You zack "Bob Showalter" <[EMAIL PROTECTED]> wrote in message 2E4528861499D41199D200A0C9B15BC031BBA6@FRISTX">news:2E4528861499D41199D200A0C9B15BC031BBA6@FRISTX... > > -Original Message----- > > From: Zachary Buckholz [mailto:[EMAIL PROT

Re: more example code Re: help dereferencing arrayref so I can put the value into a hash

2002-07-10 Thread Zachary Buckholz
dereference an already dereferenced arrayref? zack "Bob Showalter" <[EMAIL PROTECTED]> wrote in message 2E4528861499D41199D200A0C9B15BC031BBA6@FRISTX">news:2E4528861499D41199D200A0C9B15BC031BBA6@FRISTX... > > -Original Message- > > From: Zachary Buckh

more example code Re: help dereferencing arrayref so I can put the value into a hash

2002-07-10 Thread Zachary Buckholz
WHERE (monitor_report.toc_epoch between ? AND ? AND monitor_report.url_id = ?)"; my $sum_check = $dbh->selectrow_arrayref($select_query, undef, @bind_values) or die "Can't execute statement: $DBI::errstr"; push(@sum_checks, @$sum_check); } return(\@sum_check

help dereferencing arrayref so I can put the value into a hash

2002-07-09 Thread Zachary Buckholz
I understand how to use a foreach on a reference to an array as follows: my $avg_resp_time = get_avg_resp_time($durations, $url_id); foreach my $avg_resp(@$avg_resp_time) { print "AVG = $avg_resp\n"; } But how do I directly access one array value from the reference to the array? print "

number 1 showing up in printf output I don't understand

2002-07-07 Thread Zachary Buckholz
Odd extra '1' showing up? Can someone explain this. #!/usr/local/bin/perl -w my $current_date = getdate(); print "$current_date\n"; exit(); sub getdate { my ($day, $month, $year) = (localtime)[3,4,5]; my $current_date = printf("%04d-%02d-%02d", $year+1900, $month+1, $day); return($current_d

probably a simple question

2002-06-05 Thread Zachary Buckholz
Is there any function to tell if a number is even or odd? I am looking for an easy way to loop through a list and output table cell bgcolor based on even / odd. if its an even numbered row make it red if its odd make it blue. I have done it in the past by turning a switch on or off but I think t

CGI.pm and .com.com domain cookie

2002-05-18 Thread Zachary Buckholz
Would the owners of com.com be able to access any cookies set by any domain that ends with .com? While working with CGI::Application and CGI::Session and going through my cookies on my local machine I noticed a cookie from com.com Any insight from anyone about this? -- To unsubscribe, e-mai

Re: split with LIMIT misunderstanding?

2002-05-13 Thread Zachary Buckholz
Think I figured it out properly. if ($_ =~ /^\$myquery/) { quotemeta($_); (undef, $line{myquery}) = split(/=/, $_, 2); } This gives me MYQUERY = "url=$url&email=$email&i_rank=yes"; If this is not the 'proper' way please let me know of a better way. Thanks zack

split with LIMIT misunderstanding?

2002-05-13 Thread Zachary Buckholz
I have a bunch of text files that follow the format variable = value I am trying to read each file and insert it into SQL but before I can do that I need to parse the values into a hash. One of the fields has the URL which can contain & and = characters, so after the first split I seem to miss

Re: Parallel Fork Manager recommendations?

2002-05-11 Thread Zachary Buckholz
t;Randal L. Schwartz" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > >>>>> "Zachary" == Zachary Buckholz <[EMAIL PROTECTED]> writes: > > Zachary> I have been using Parallel::ForkManager for a while a

Re: MD5

2002-05-10 Thread Zachary Buckholz
This is what I use to check if a website has changed. It makes an MD5 string. #!/usr/bin/perl use LWP::Simple; use Digest::MD5 md5_hex; for (@ARGV) { $url = $_; $content = get($url); $digest = md5_hex($content); print "$digest"; } exit(); "Arran" <[EMAIL PROTECTED]> wrote in message 056401

Parallel Fork Manager recommendations?

2002-05-10 Thread Zachary Buckholz
I have been using Parallel::ForkManager for a while and it has worked great for me I just used it again in another program and it's working ok. But I was curious to see if anyone had any recommendations for other alternatives? The current program I am considering using it in is a rewrite of a sea

WEB Monitoring Script going crazy

2002-04-27 Thread Zachary Buckholz
I wrote the script below to pull data from a mysql database and update the datebase based on the results of a check. I have used Parallel::ForkManager which I used in the past in another script without problems. But for some reason this script killed my server today when it tried to check 4,000 pl