in reply to Re: How to flatten an x-dimensional array?
in thread How to flatten an x-dimensional array?
sub flatten { return unless @_; my $val = shift; return flatten(@$val, @_) if UNIVERSAL::isa($val, 'ARRAY'); return $val, flatten(@_); }
------
We are the carpenters and bricklayers of the Information Age.
Don't go borrowing trouble. For programmers, this means Worry only about what you need to implement.
|
|---|