if (my $rec = $sth->fetchrow_hashref) { $Cookie2 = cookie('C2'); $f1 = $rec->{field_X};