Perl hashref and DBI

David A. Bandel david.bandel at gmail.com
Sun Mar 6 18:30:52 PST 2011


Folks,

I have a database where I need to select a particular column as a Perl
hashref.  The column has data that looks like this:
SIP/100-00005ec8
SIP/100-00005ec9
SIP/119-00005cca
SIP/129-00005ec8

I need to use this column as a key, but using either just the SIP/100
or preferably just the 100 part.  Ideally, I would just preprocess the
input to DBI's selectall_hashref, but not sure if that can be done.
Basically, SIP/100 is an extension, and I need to strip off (or mask)
the unique hex channel id so I can count() the number of calls
received by each extension.

Thoughts on a way to do this anyone?

TIA,

David A. Bandel
-- 
Focus on the dream, not the competition.
            - Nemesis Air Racing Team motto
Visit my web page at: http://david.bandel.us/




More information about the Linux-users mailing list