in reply to Re^9: What esteemed monks think about changes necessary/desirable in Perl 7 outside of OO staff
in thread What esteemed monks think about changes necessary/desirable in Perl 7 outside of OO staff
#!/usr/bin/perl use warnings; use strict; use feature qw{ say }; sub single ($) { chr $_[0] } sub two ($$) { join "", map chr, @_ } say for split single 32, 'a b c'; say for split two(32, 32), 'a b c'; # This fails with "Too many arguments for main:two" say for split two(32, 32), 'a b c';
split can take more than one argument, so it greedily takes all it can.
> Unless this problem is fixed
It's not a problem, it's a documented behaviour.
|
|---|