Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Null-stripping performance

by qiau (Initiate)
on Feb 26, 2007 at 12:57 UTC ( [id://602113]=perlquestion: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    $string = "123".\0.
              "1".\0.\0.\0.
              "23".\0.\0;
    
  2. or download this
    (undef, $value) = unpack("a$index A4", $string);
    
  3. or download this
    $value = substr($string, $index, 4);
    $value =~ s/\0//g;
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others meditating upon the Monastery: (4)
As of 2024-04-23 23:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found