in reply to DBD::Oracle - RAW datatypes

I know this is an old thread, but I'm including my solution below in hopes that it will help somebody out there.... Call the subroutine below with the RAW you get from the query... This will "fix" the raw.
sub fixRaw(\$) { my $raw = shift; return undef unless defined $raw and defined $$raw; ################################################################## # Split the raw into 2 byte chunks, interpret each chunk as hex, # then pack it! ################################################################## return join('',map(pack('C', hex($_)), $$raw =~ /../sg)); # The below also works... I don't know which is fastest. # return join('',map(pack('C', hex($_)), unpack("a2"x(length($$raw +)/2),$$raw))); }

Replies are listed 'Best First'.
Re^2: DBD::Oracle - RAW datatypes
by Anonymous Monk on Apr 11, 2014 at 14:48 UTC
    Thanks wyrickre. Exactly what I needed!