# New Ticket Created by Bram # Please include the string: [perl #53554] # in the subject line of all future correspondence about this issue. # <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=53554 > Double/Triple magic happens with the range operator. $ cat range.pl #!/usr/bin/perl -l use strict; use warnings; use Tie::Scalar; use base qw/Tie::StdScalar/; my $count; sub FETCH { $count++; ${ $_[0] } } my $x; tie $x, "main", 5; $count = 0; my @y1 = $x .. 6; print "my \@y1 = \$x .. 6 = $count calls to FETCH"; $count = 0; my @y2 = 4 .. $x; print "my \@y2 = 4 .. \$x = $count calls to FETCH"; $count = 0; my @y3 = $x .. $x; print "my \@y3 = \$x .. \$x = $count calls to FETCH"; $ perl range.pl my @y1 = $x .. 6 = 3 calls to FETCH my @y2 = 4 .. $x = 3 calls to FETCH my @y3 = $x .. $x = 6 calls to FETCH (Tested with 5.8.8/5.10.0/blead) I did try looking at it a while back but I gave up... Kind regards, BramThread Next