#!/usr/local/bin/perl -w use strict; my $test_arg = $ARGV[0]; my @string = split('-',$test_arg); my $beg_date = $string[0]; my $end_date =$string[1]; my $date = $beg_date; my @list; if ($string[0] ge $string[1]) { die "Invalid date range\n"; } elsif ($test_arg =~ /\d{8}-\d{8}/){ $test_arg = "1"; } else { $test_arg = "0"; } die "Usage: $0 \n" unless $test_arg == "1"; while ($date <= $end_date){ push (@list, $date); } continue { $date++; }