#! /usr/bin/perl -w use strict; use warnings; use feature qw(say); my @hoge = (0, 1, 2, 3, 4, 5, 6, 7); while (@hoge) { say pop @hoge; }