I am confused with looping to stop repeat accurances of a entryies ina log for a report

2002-09-03 Thread FLAHERTY, JIM-CONT
I am trying to parse a squid log file to let It management know where people are browsing too. my plan block diagram goes a follows 1. open log 2. seperate by IP address , list only one at a time no repeats of the same IP address 3. list only one instance of a visited site , per IP address 4

What perl module converts unix time to regular time and date

2002-08-26 Thread FLAHERTY, JIM-CONT
What perl module converts unix time to regular time and date ? Thanks Jim

get page with IO::Socket , but having trouble saving to file

2002-07-13 Thread FLAHERTY, JIM-CONT
Hello, get page with IO::Socket , but having trouble saving to file This is what I got: use IO::Socket; $host = "www.cnn.com"; $document = "/newhomepage1.htm"; foreach $doc ($document) { $remote = IO::Socket::INET->new( Proto => "tcp",

disable printing an output of a perl script file

2002-07-12 Thread FLAHERTY, JIM-CONT
I have a quiz program, the script queries the DB and print to the browser a test for the student to take. I would like to prevent them from printing that test. All my clients are IE 6.0 Thanks Jim

Is there a perl module that allows access to Notes on NT box from a Red hat Box

2002-07-11 Thread FLAHERTY, JIM-CONT
Is there a perl module that allows access to Notes on NT box from a Red hat Box?

I need advise Redhat7.1/MYSQL/PERL updates DB on Lotus Notes on NT box

2002-07-09 Thread FLAHERTY, JIM-CONT
I need advise Redhat7.1/MYSQL/PERL updates DB on Lotus Notes on NT box, is this project hopeless ? Any Ideas where to start?

help Grading my test

2002-06-24 Thread FLAHERTY, JIM-CONT
hello , I have a quiz script. I randomly generates questions up to an certain number ( what is ever set in the quiz name settings table) , passes it ina variable to a grade.cgi. the variable looks like this !34!56!5!67! all question numbers seperated by a delimiter. all these questions c

What am I doing wrong... I want to increment a number in a DB

2002-06-02 Thread FLAHERTY, JIM-CONT
I have a query to draw it out on my redhat 7.1 box with MySQL 3.23 and I increment it and run update query . Some where it resets back to zero all the time the code foreach $row(@$array_ref) { my($num,$title,$media,$serial,$time,$class,$remarks,$custody,$loc, $format,$qty,$lab,$rew,$sta,$hist

FW: Hello all this grading program is still messing up

2002-05-23 Thread FLAHERTY, JIM-CONT
aybe parsing the array is too fast for the query ??? I attached a results for a grading page thanks Jim -Original Message- From: FLAHERTY, JIM-CONT [mailto:[EMAIL PROTECTED]] Sent: Thursday, May 23, 2002 4:08 PM To: Beginners (E-mail) Subject: Hello all this grading prog

Hello all this grading program is still messing up

2002-05-23 Thread FLAHERTY, JIM-CONT
I have a test maker script , that generates random questions from a DB My grader script needs to grade those same random questions it has a variable that called $questions_asked its output is like this !146!612!145!385!655!34!122!583!119!109 the code #! /usr/bin/perl #user gr

Perl / MySQL problem

2002-05-14 Thread FLAHERTY, JIM-CONT
Does anyone have an Idea whats going on here , I have an array feeding a SQL Query, But it doesnt always come back with a success . What this query does it is on a Quiz web site . Students take quiz, variable is passed to grade.cgi. that variable is parsed with a while statement. and a variable

How to a parse a string in perl

2002-05-10 Thread FLAHERTY, JIM-CONT
I want to slice up this variable into a single variable and loop until its empty The variable is seperated via ! explnation points and I want the numbers. This string can be various in length ? Note it doesnt end with that delimiter. Help example $jims = "!23!45!67

FW: Scripts picks random elements from array , but it repeats sometimes

2002-04-29 Thread FLAHERTY, JIM-CONT
Hello , My script picks out random elements from an array , but it sometimes repeats ( which is no good) .. I want to prevent this , Do I delete the element from the array or is there a better way ? And how do I do either ? my mistake here is the code while($numofques > 0)

Scripts picks random elements from array , but it repeats sometimes

2002-04-29 Thread FLAHERTY, JIM-CONT
Hello , My script picks out random elements from an array , but it sometimes repeats ( which is no good) .. I want to prevent this , Do I delete the element from the array or is there a better way ? And how do I do either ? Thanks Jim

How do I pass an array to another CGI script

2002-04-24 Thread FLAHERTY, JIM-CONT
What is the best and easiest way to pass an array to another CGI script? I am open for any suggestion -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Help with MIME::Lite module

2002-04-12 Thread FLAHERTY, JIM-CONT
I am wanting to send HTML reports to clients that can read html mail. In the Data section is where you put the body of the message . If I type html and text it works fine. but when I try to add a variable the body of the message has $nhtmlpage nothing on whats in the variable. Help co

I have numbers in an array how do extract them in a random order ?

2002-04-10 Thread FLAHERTY, JIM-CONT
I have numbers in an array how do extract them in a random order ? . I want to feed them to a sql query to extract information , just the first 10 of them code ## $dbh =DBI ->connect($data_source, $username, $password) or die "cant connec

Trying to add things to an array , but it has blank spaces

2002-04-03 Thread FLAHERTY, JIM-CONT
Hello, It seams I am sucessfully adding numbers to my array , but in turn tey are blank spaces. I need Help My code $dbh =DBI ->connect($data_source, $username, $password) or die "cant connect to $data_source : my $dbh-> errstr\n"; my $sth1 = $dbh -> prepare("select num from tests where subj

I have to Randomize my Query output

2002-03-29 Thread FLAHERTY, JIM-CONT
I am lost . I have this quiz program , It prints and grades the quiz . now the managers want to make it put out random tests My Code : $dbh =DBI ->connect($data_source, $username, $password) or die "cant connect to $data_source : my $dbh-> errstr\n"; my $sth1 = $dbh -> prepare("select

thanks for the response yesterday , but I still dont get it ... Trying not to add dup names in DB

2002-03-28 Thread FLAHERTY, JIM-CONT
I made the column testname unique . But I did quite understand how to change to query syntax. Stephen told me to add where clause "Where IDENTIFIER NOT IN ( SELECT IDENTIFIER FROM TABLE)" I dont get what he means .. I am new to perl . the table show columns from phistory; +---

How Do I add a record to a table if it dont exist ??

2002-03-27 Thread FLAHERTY, JIM-CONT
I have a delima I want to add records to a table in mysql , only if that record isnt there , Help Code my $sth1 = $dbh -> prepare("select distinct testname from testhistory"); $sth1 -> execute or die " unable to execute query "; #$sth1 -> finish; my $array_ref1 = $sth1->fetchall_arrayref

I have a script that print test questions and grades them... how do I make them print a random order

2002-03-27 Thread FLAHERTY, JIM-CONT
I have a script that print test questions and grades them... how do I make them print a random order, and a certain amount ?? code $dbh =DBI ->connect($data_source, $username, $password) or die "cant connect to $data_source : my $dbh-> errstr\n"; my $sth1 = $dbh -> pre

Help ..trying to send HTML Email to clients on outlook 2k with MIME-Lite-HTML-1.8

2002-03-27 Thread FLAHERTY, JIM-CONT
I trying to send HTML Email to clients on outlook 2k with MIME-Lite-HTML-1.8 I want to send reports html enabled mail intead of the old text mail . I was working with this module from CPAN , help our am I going about it the wrong way Code #!/usr/bin/perl -w ### Get Date

I am clueless about making my test generator program to generate random questions.... Help

2002-03-22 Thread FLAHERTY, JIM-CONT
I have a script that generates test questions and grades them . I was asked to make them generate in a random order , can someone point me in the right direction They come in two files make_test.cgi and grade.cgi #! /usr/bin/perl # #make test for Cram Program # # version 0.02

perl DBI to Mysql , what happens when field I query is blank ?

2002-03-20 Thread FLAHERTY, JIM-CONT
Hello I have redhat 7.1 and mysql , I am trying to query DB of People if there is no record for this person , I want to add them . My problem seams to be what is in query results with it comes back blank here is the code $dbh1 =DBI ->connect($data_source, $username, $password) or die "can

How to send html email from a linux box to recipents who use outlook 2k

2002-02-19 Thread FLAHERTY, JIM-CONT
Hello , I have a perl script thats sends dept managers active adp trouble calls to there email, is there a way I can send them in HTML format instead of text . I use redhat 7.1 , my users use outlook 2k on win 2k thanks -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e

How do I get trim or rounding on a float number ?

2002-02-08 Thread FLAHERTY, JIM-CONT
$ aver = $total_hours/$total_jobs some times comes up with 24.97 . I would like to round or trim to 24.99 for example . any Ideas ?? thanks Jim F

Help with negitive query results in Perl and MySql

2002-01-24 Thread FLAHERTY, JIM-CONT
I have Red hat 7.1 . I have a script that scans the common drive and gathers file owner name , size, and last access date . and dumps into a DB. the second half if the script gets owners name and looks up in another table .. that I have been manually installing user name to email . I want the scr

help with count query in mysql

2002-01-15 Thread FLAHERTY, JIM-CONT
How do you do a count query in mysql ? I have redhat 7.1 mysql 3.23 code ## # get stats ## use DBI; my $database = "VHD"; my $data_source = "DBI:mysql:$database"; my $username

help with DBD error

2001-12-20 Thread FLAHERTY, JIM-CONT
hello, I have redhat 7.1 and perl is loaded with mysql , I have several scripts with perl , DBI, DBD and mysql working fine , so If think I have everything set up properly But I get an error : DBD::mysql::st execute failed: Duplicate entry '204' for key 1 at /var/www/cgi-b in/sobt/chstat

Help with global match and replace

2001-11-19 Thread FLAHERTY, JIM-CONT
My script dumps file name into a mysql DB on redhat 7.1 linux . The problem I have is sometime windows files has a single quote ( ' ) in the name. I want to replace it with a space . I not strong on pattern matching in perl yet $thestring = "this isn't a good file name"; Help , thanks in

problem with redirect

2001-09-16 Thread FLAHERTY, JIM-CONT
This is what my error log says on my redhat 7.1 [Sun Sep 16 13:18:33 2001] [error] Undefined subroutine &main::redirect called at /var/www/cgi-bin/sobt/add.cgi line 38. [Sun Sep 16 13:18:44 2001] [error] [client 192.168.1.8] Premature end of script here is my code: $dbh =DBI ->connect($da

Issuing rollback() for database handle being DESTROY'd without explicit disconnect().

2001-06-11 Thread FLAHERTY, JIM-CONT
Why am I getting this ?? Issuing rollback() for database handle being DESTROY'd without explicit disconnect(). the code #!/usr/bin/perl # Script to maintain KBHD Stats # # Version 1.0 # # date : 6 Jun 01# ###

is there a receipt for send mail

2001-05-23 Thread FLAHERTY, JIM-CONT
Hello, I want to automatically get a receipt for a user when they read the email my script sends out . I have red hat 7.1 Thanks in advance Jim

problem with environment variable

2001-05-18 Thread FLAHERTY, JIM-CONT
Here is my code # # Drop us an E-mail # $hostadd = $ENV{REMOTE_HOST}; print "Host : $hostadd\n"; But it isnt working , all I see is Host: What am I doing wrong ? Thanks in advance

Help With Matching

2001-05-11 Thread FLAHERTY, JIM-CONT
I am trying to substite , I want to replace <> between the words and replacing them with because I am reading a file that is uploaded and making a table in a web page when this script is run $test1 = " the is a test"; $test1 = s/<>//g I dont get the desired result , can