#!/usr/bin/perl while() my $count=o; { print 'Enter a number'; chomp ($input = ); foreach $input {$count++ } last; }