Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?

Re: Removing Trailing Whitespace: Multiple ways.

by no_slogan (Deacon)
on May 11, 2001 at 22:43 UTC ( [id://79809]=note: print w/replies, xml ) Need Help??

in reply to Removing Trailing Whitespace: Multiple ways.

Hey, good idea. The unpack solution assumes the length of the string is 8. It'll get a bit slower if it's generalized.

Update: Strike that. unpack "A*" runs faster than unpack "A8" on my machine. Anyone have an idea why that might be?

Benchmark: timing 1000000 iterations of unpack*, unpack8... unpack*: 7 wallclock secs ( 6.65 usr + 0.00 sys = 6.65 CPU) unpack8: 8 wallclock secs ( 7.40 usr + 0.00 sys = 7.40 CPU)

Log In?

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

How do I use this?Last hourOther CB clients
Other Users?
Others taking refuge in the Monastery: (6)
As of 2024-04-25 11:54 GMT
Find Nodes?
    Voting Booth?

    No recent polls found