1: sub atohexstring
2: {
3: my $s = "";
4: foreach(@_){
5: $s .= tohex($_) . " ";
6: }
7: chop($s);
8: return $s;
9: }
다음과 같이 쓰면 됨. my @a = hexarray("A0 A1 A2 FF FE FD");
print("@ " . atohexstring(@a) . "\n");
No comments:
Post a Comment