RE: need to ouput excel / PDF file

2001-11-26 Thread Peter Hanson
Hey Paul, you can go to search.cpan.org and do a module search for Spreadsheet::WriteExcel This will let you right out excel files, works really well. As for PDF's, again if you go to search.cpan.org (this site is your best friend for finding modules) and do a module search for PDF, you should

RE: Calculation the total of my column

2001-08-15 Thread Peter Hanson
tes) FROMtable WHERE status = 'COMPLETE' } ) || die $dbh->errstr; ; After execution, the query will return one row and one column with the sum of all the minutes that meet the conditional. Hope this help

RE: Truth and SQL

2001-07-17 Thread Peter Hanson
First off, this assumes you are using DBI in your perl script. The line of code you want is this: my $rows = $sth->rows; This will run after the execute statement of a SQL query. $rows will contain how many rows were affected or it will return -1 if there was a problem (returned undef, error,

RE: removing white spaces

2001-07-16 Thread Peter Hanson
Try: $string =~s/ //g; That will get rid of all spaces. If you also want to get rid of tabs, $string =~s/[ \t]//g; Or you can use a \s instead of \t to also get rid of newlines, carriage returns and form feeds. Pete Hanson source1results.com -Original Message- From: softhome [mailto:

RE: Searching a MYSQL database

2001-07-16 Thread Peter Hanson
Try this: #!/usr/bin/perl -w use strict; use DBI; my $user = 'bob'; my $dbh = DBI->connect('DBI:mysql:database=foo;host=55.55.55.55', 'test', 'test',); my $cursor = $dbh->prepare("Select user from foo where exp = curdate\(\) and user = '$user'"

Help with the GnuPG module

2001-07-02 Thread Peter Hanson
Hi all, The main PERL programmer in our company has gon on vacation for a few days and has left me in charge of finishing off a script that is suppose to encrypt some data. We decided on using GnuPG program for the encryption because perl had a module that used it. Below is a sample of code that