I believe that is the "raw" format as it would go over the wire, but it's only the SRV record part, not the whole packet or whole DNS layer. Your solution above requires at least the whole DNS layer (if using $offset = 0) - at least that's they way I interpret it and according to a quick test, seems likely:
corrupt wire-format data at C:/Strawberry/perl/vendor/lib/Net/DNS/RR.p
+m line 241.
You can try the Net::Frame::Layer::DNS module and it's NFL::DNS::RR::SRV sub module - you'll need the Net::Frame and Net::Frame::Simple modules as well (they will auto-install if you do a 'cpan Net::Frame::Layer::DNS' install as they are listed as dependencies) and they have dependencies themselves - so it may get a bit bigger than you need, but this works:
#!perl
use strict;
use warnings;
use Net::Frame::Simple;
my $data = "\000\012\000\144\023\304\003pbx\007example\003com\000";
my $info = Net::Frame::Simple->new(
raw => $data,
firstLayer => 'DNS::RR::SRV',
);
print $info->print;
Output:
DNS::RR::SRV: priority:10 weight:100 port:5060
DNS::RR::SRV: target:pbx.example.com
UPDATE: Note the ':3600' is *not* part of the of the SRV rdata. It is part of the DNS Answer section so the $data in the OP isn't exactly the raw wire format.