in reply to Re: split slice?
in thread split slice?
I'd be a bit worried that the second version may not perform the shifts in left to right order. There are no guarantees about the order that elements in a list are evaluated. Better would be:
sub extract { return join('-', (split(/:/, $_[0]))[1,2], $_[1]); }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: split slice?
by grinder (Bishop) on Oct 14, 2007 at 10:18 UTC |