[Nh-pm] The Perly Way
Ray Cote
rgacote at AppropriateSolutions.com
Wed May 14 13:09:57 CDT 2003
At 1:27 PM -0400 5/14/03, Paul L Lussier wrote:
>How about:
> # run query and output result with Oracle nulls converted to string 'NULL'.
> sub runQuery {
> my ($sql) = @_;
> my $aref = dbSqlReturnAllRows( $dbh, $sql ) or die;
> my $rowref;
>
> foreach $rowref (@$aref)
> {
> map { $_ = 'NULL' if !defined($_) } @$rowref;
> print join( "\t", @$rowref) . "\n";
> }
> }
Hi Paul.
My preference is for this first one.
Seems the most readable for me.
Thanks for the quick feedback.
(so much to learn...)
--Ray
--
Raymond Cote
Appropriate Solutions, Inc.
PO Box 458 ~ Peterborough, NH 03458-0458
Phone: 603.924.6079 ~ Fax: 603.924.8668
rgacote(at)AppropriateSolutions.com
www.AppropriateSolutions.com
More information about the Nh-pm
mailing list