#!/usr/local/bin/perl use strict; use warnings; { package _; use Carp; sub TIESCALAR { bless {}, shift } no warnings 'once'; sub FETCH { croak q(Don't you dare get $_) } sub STORE { croak q(Don't you dare set $_) } } tie $_, "_"; my @a = (0..9); my @b = map { $_ * $_ } @a; my @c = grep { $_ % 2 } @b; local $\ = "\n"; # make print say print for @c; print while () __DATA__ one two three