NAME

Perl::ToPerl6::Transformer::Variables::ReplaceNegativeIndex - Perl6 now uses [*-1] notation to represent negative indices.

AFFILIATION

This Transformer is part of the core Perl::ToPerl6 distribution.

DESCRIPTION

Perl6 uses the new open-ended range notation [*-1] to access the last element of an array:

$x[-1] --> $x[*-1]
$x->[-1] --> $x->[*-1]

Transforms variables outside of comments, heredocs, strings and POD.

CONFIGURATION

This Transformer is not configurable except for the standard options.

AUTHOR

Jeffrey Goff <drforr@pobox.com>

COPYRIGHT

Copyright (c) 2015 Jeffrey Goff

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.