Добрый день,

> overload говрит, что можно перегуржать <>
> "Iteration
> If <> is overloaded then the same implementation is used for both the
> read-filehandle syntax <$var> and globbing syntax<${var}>.
> "
>
> но как??

Точно так же, как и любой другой overload:

use 5.020;
use overload "<>" => sub {state $i=10; $i?--$i:undef};
my $f=bless {};

warn $_ while (<$f>);

Best regards,
Sergey Aleynikov
-- 
Moscow.pm mailing list
[email protected] | http://moscow.pm.org

Ответить