in reply to Cropping Elements in an Array
That's probably going to be more efficient than most any regexp. If you cannot guarantee that you want characters 0..24 always from this string, or that the data format will change, you should probably go with a slightly more expensive regexp alternative, as posted by others.$_ = substr($_, 0, 24) for @array;
|
|---|