Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re^2: Problems with converting raw data to text

by anderam (Initiate)
on Dec 08, 2009 at 12:31 UTC ( [id://811725]=note: print w/replies, xml ) Need Help??


in reply to Re: Problems with converting raw data to text
in thread Problems with converting raw data to text

Many thanks for your solution of my problem. It Works!

But I don't understand the magic used in that line. Could you please explain that for me?

$payload =~ s/[^[:print:]]/./g;

Replies are listed 'Best First'.
Re^3: Problems with converting raw data to text
by bv (Friar) on Dec 08, 2009 at 16:55 UTC

    The [:print:] is a character class matching printable characters. See Character Classes and other Special Escapes for more about character classes. So the statement replaces all non-printable characters with periods.


    @_=qw; Just another Perl hacker,; ;$_=q=print "@_"= and eval;

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://811725]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chanting in the Monastery: (4)
As of 2024-04-25 06:09 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found