my $thing; while $something (@somethingelse) { my $thing; ....; print $thing; }