Re: RFC 212 (v1) Make length(@array) work
[email protected] (Tom Christiansen) Sun, 17 Sep 2000 18:33:18 -0600
| Newsgroups | perl.perl6.language.subs |
|---|---|
| Message-ID | <1774.969237198@chthon> |
>Nathan Wiger writes:
>> Brainstorming off the top of my head:
>>
>> sub length (($|@)) {
>>
>> }
>>
>> That is, use a regex-like "(x|y)" - or maybe [$@%] ?? - for alternative
>> context coercions.
>The only RFC on prototype extensions we have is Andy Wardley's #57.
>I suggest you ask him to add this feature.
What do you do when someone wants
$bytes = length Some_File_Handle;
or
$files = length Some_Directory_Handle;
or
$bytes = length Some_Directory_Handle;
or
$blocks = length Some_Directory_Handle;
--tom