in reply to What is the most efficient way to split a long string (see body for details/constraints)?
If your lines have substantially more fields than 31, you can use the LIMIT parameter to split:
my @fields = split /\t/, $_, 32;
This prevents split from doing unnecessary work, but you should benchmark whether it actually makes a difference.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: What is the most efficient way to split a long string (see body for details/constraints)?
by mikegold10 (Acolyte) on Jun 19, 2019 at 15:55 UTC |