# test.pl while (my $line = <>) { chomp $line; print qq{$line\n}; # yes I know, pointless use of chomp } #### > perl test.pl < test.pl # test.pl while (my $line = <>) { chomp $line; print qq{$line\n}; # yes I know, pointless use of chomp } #### while (my $item = pop @my_array) { # do stuff with $item }