Have you tried just using the data as-is? $payload looks to me to be a string already, even though it contains non-printable hex chars. It should still be able to match against regular expressions. To print the packet out, you could do something like this:
$payload =~ s/[^[:print:]]/./g;As a side note, don't quote variables unnecessarily. There is very little difference between "$payload" and $payload, and it's not the difference a shell programmer would expect.
@_=qw; Just another Perl hacker,; ;$_=q=print "@_"= and eval;
In reply to Re: Problems with converting raw data to text
by bv
in thread Problems with converting raw data to text
by anderam
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |