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

Fast string construction

by citromatik (Curate)
on Apr 07, 2011 at 13:00 UTC ( [id://898040]=perlquestion: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    open my $fh, "<", $file or die $!;
    while (<$fh>){
      my ($key,$val) = split /\t/;
      substr($bin,$key*4,4,pack("N",$val));
    }
    
  2. or download this
    substr($bin,$_*4,4,pack ("N",0)) for (0..$last_val);
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others browsing the Monastery: (5)
As of 2024-04-24 20:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found