in reply to Re^3: Correct idiom for default parameters
in thread Correct idiom for default parameters
? I'm not sure whether it's more readable. Or whether it's harder to remember that a negative third argument to split indicates trailing empty fields should be preserved than it is to remember the name of the flag.my $substr = substr(subject => $str, first_char => 5, length => 3, + replacement => "bar"); my @parts = split(subject => $str, pattern => qr/foo/, max_parts = +> 7, keep_trailing_empty_fields => 1);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: Correct idiom for default parameters
by Your Mother (Archbishop) on Apr 29, 2010 at 14:07 UTC |