Sorry, that last line was wrong...
my $in = '07032003';
$in =~ s/^0+/$1/ if (/(\d{2})(\d{2})(\d{4})$/);
# my $out = qq($in/$2/$3); yuck, sorry
# Now we can do the replacement with no problem
# because we've restructured $in to dd/dd/
my $out = qq($1/$2/$3) if (/(\d{2})(\d{2}
> > 2- Want to format dates like birth = 02151956 should be 02/15/1956
> my $date = "$1/$2/$3/" if (/(\d\d)(\d\d)(\d\d\d\d)/)
# All of this is UNTESTED, please treat as such.
# More of "the same but different"
my $date = qq($1/$2/$3) if /(\d{2})(\d{2})(\d{4})/;
# Takes into account dates lik
YES.
changing return $row->{PWORD}; to $row->{"DECODE(PWORD,'blah')"}; fixed it :D
S.T.O.U.T. = Synthetic Technician Optimized for Ultimate Troublshooting
- Original Message -
From: "Dennis Stout" <[EMAIL PROTECTED]>
To: "Kristofer Hoch" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Wed
That could have been entertaining. Still gives me a blank variable tho =/
I would be more than happy to post complete source code, but it's VERY lengthy
(I got 8 modules, each of about 300 lines of code or more...).
Dennis
- Original Message -
From: "Kristofer Hoch" <[EMAIL PROTECTED]>
I have another subroutine,
sub select_hashref
{
my $self = shift;
my $dbh = $self->{dbh};
my ($select, $from, $where, $other) = @_;
my $sql="SELECT $select ";
$sql.="FROM $from " if $from;
$sql.="WHERE $where " if $where;
$sql.="$other" if
sub select_decode
{
my $self = shift;
my $dbh = $self->{dbh};
my($select,$from,$where,$other) = @_;
my $sql="SELECT DECODE($select,\'blah\') ";
$sql .= "FROM $from " if $from;
$sql .= "WHERE $where " if $where;
$sql .= $other if $
Hi.
Whenever I try to get the value of a field in a row from a SQL database, I'm
either passed a blank line or the name of the spot in memory in which the
information I want resides (like HASHx('80fd23afcc') or something). Earlier
in the code, the right use statements as well as $Sql = TTMSSQL->n
> 1- Remove all the leading 000 from any field like acct# = 00037839842
> should be 37939842 and Post# should be 1980
s/^0+//;
>
> 2- Want to format dates like birth = 02151956 should be 02/15/1956
my $date = "$1/$2/$3/" if (/(\d\d)(\d\d)(\d\d\d\d)/)
HTH
Paul Kraus
--
To unsubscribe, e-mail