in reply to Stdin for just numbers.

I don't recommend writing applications that interact with a user, asking the user to enter data. Such applications may seem beneficial to the end user, but not if that end user is another application. Rather, use tools that provide a means to accomplish both readability (for humans) and non-inter-activeness (for non-humans). In other words, consider using command line arguments over reading in "raw" STDIN.

#!/usr/bin/env perl use strict; use warnings; use Data::Dumper; use Getopt::Long; use Pod::Usage; my @opts = qw( starting-amount current-age retire-age deposit interest expected ); GetOptions ( ( \my %args => map "$_=i", @opts ), 'help' => \my $help, 'man' => \my $man, ); pod2usage( -verbose => 1 ) if $help; pod2usage( -verbose => 2 ) if $man; for (@opts) { pod2usage( -msg => "$_ is required", -exitval => -1, -verbose => 0, ) unless defined $args{$_}; } pod2usage( -msg => "retire-age must be greater than current-age", -exitval => -1, -verbose => 0, ) if $args{'retire-age'} <= $args{'current-age'}; print Dumper \%args; __END__ =head1 NAME retirement-calculator - app to calculate retirement amount =head1 SYNOPSIS retirement-calculator [options] Options: --starting-amount the amount to start retirement with --current-age how old you currently are --retire-age what age you want to retire at --deposit amount deposited per year --interest annual interest rate --expected what you expect to retire with --help list usage --man print man page =cut

jeffa

L-LL-L--L-LL-L--L-LL-L--
-R--R-RR-R--R-RR-R--R-RR
B--B--B--B--B--B--B--B--
H---H---H---H---H---H---
(the triplet paradiddle with high-hat)