in reply to Re^3: Replace a Hex Value in Column
in thread Replace a Hex Value in Column

tr might be faster than split:
#!/usr/bin/perl use warnings; use strict; use Syntax::Construct qw( /r ); my $s = '19:68:09:24:00:5b:00:7e:53:53:4c:2e:47:6f:6f:67:6c:65:00:00:0 +0:00:00:00'; sub ch { my $s = $_[0]; pack 'H*', $s =~ tr/://dr } sub hx { my $s = $_[0]; pack '(H2)*', split /:/, $s } use Test::More tests => 1; is ch($s), hx($s), 'same'; use Benchmark qw{ cmpthese }; cmpthese(-2, { ch => sub { ch($s) }, hx => sub { hx($s) }, });
($q=q:Sq=~/;[c](.)(.)/;chr(-||-|5+lengthSq)`"S|oS2"`map{chr |+ord }map{substrSq`S_+|`|}3E|-|`7**2-3:)=~y+S|`+$1,++print+eval$q,q,a,