Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: Re: Re: Efficienty truncating a long string

by BrowserUk (Patriarch)
on Dec 19, 2003 at 16:05 UTC ( [id://315822]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    # 3332k;
    $s = ' ' x 1_000_000;
    ...
    $s .= '?' x 2000;
    
    # 4316k;
    
  2. or download this
    # 3336k;
    $s = ' ' x 1_000_000;
    ...
    $t = substr $s, 0, 999_999;
    
    # 5308k;
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (3)
As of 2024-04-19 21:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found