#!/usr/local/bin/perl
# third time is the charm - i hope this has proper formatting.
use strict;
my $date_cfg;
my $new_date;
print "Enter date of config file using : ";
$date_cfg=<>; # you actually have to get the input chomp $date_cfg;
#chomp off the lf
$date_cfg =~ s!(\d{4})/(\d{2})(\d{2})!$2/$3/$1!;
# year / month day mo/da/yr
die "Wrong date config" unless ( -e "/home/limo/Perl/$date_cfg/test");
# not sure what the until was here - might have been part of a larger construct
# that u simplified for the example.
print "Creating Juniper configuration file from: $date_cfg\n";
#hth, ___cliff rayman___cliff_at_rayman.com