while (<>) { } #### while (defined($_ = )) { (); } #### perl -MO=Deparse test.pl #### #!/usr/bin/perl use strict; use warnings; print "Enter 5 numbers: \n"; my $i=0; my @arr1=(); while (<>) { chomp; push @arr1, $_; last if ++$i > 4; } foreach my $m (@arr1) { print $m, "\n"; }