in reply to split slice?
Meaningful sub and variable names are really easy to set once you get into the habit - and the extra time you'll take for that will return tenfold to you in the nearest future.sub extract_and_add { my ($colon_sep_string, $extra_elem) = @_; my ($first, $second, $third, $ignore) = split( /:/, $colon_sep_str +ing ); return join('-', $second, $third, $extra_elem); }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: split slice?
by CountZero (Bishop) on Oct 14, 2007 at 12:00 UTC | |
|
Re^2: split slice?
by grinder (Bishop) on Oct 14, 2007 at 10:15 UTC |