Gossamer Forum
Home : General : Perl Programming :

manipulating data before storing

Quote Reply
manipulating data before storing
 after lots of testing i have:

Code:
foreach ( keys %{$self->{db}->cols} ) {
next unless ($self->{db}->cols->{$_}->{'type'} eq 'DATE' );
$tmp = $self->{cgi}->{$_};
}
so i have determined that i have successfully found data field with type = DATE; $tmp is the current value of the data field. i want to send $tmp to a subroutine to change the format of the string. i thought i could use:

$self->{cgi}->{$_} = my_sub($tmp);

but even if i have a useless sub like

sub my_sub {
my ($data) = $_[0];
return '01-01-2010';
}

it seems to lock up and never comes back to rest of script. must be something simple but what?
Subject Author Views Date
Thread manipulating data before storing delicia 9111 Dec 7, 2010, 1:58 PM
Thread Re: [delicia] manipulating data before storing
Andy 8944 Dec 7, 2010, 11:52 PM
Thread Re: [Andy] manipulating data before storing
delicia 8973 Dec 8, 2010, 12:49 PM
Thread Re: [delicia] manipulating data before storing
Andy 8938 Dec 8, 2010, 11:39 PM
Thread Re: [Andy] manipulating data before storing
delicia 8972 Dec 9, 2010, 6:17 AM
Post Re: [delicia] manipulating data before storing
brewt 8897 Dec 9, 2010, 10:56 AM
Thread Re: [delicia] manipulating data before storing
Jack 8790 Dec 19, 2010, 6:55 PM
Post Re: [Jack] manipulating data before storing
delicia 8786 Dec 20, 2010, 7:29 AM