Limo has asked for the wisdom of the Perl Monks concerning the following question:
2000/0827to:
08/27/2000this isnt working:
#!/usr/local/bin/perl -w
use strict;
my $date_cfg;
my $new_date;
print "Enter date of config file using < yyyy/mmdd >: ";
chomp ( $date_cfg = <STDIN>);
until ( -e "/home/limo/Perl/$date_cfg/test") {
die "Error: $!\n";
}
$date_cfg =~ s!(d{4})/(d{4})!$2/$3/$1!;
print "Creating Juniper configuration file from: $date_cfg\n";
I also tried :
....snip print "Creating Juniper configuration file from: $2/$3/$1\n"Doesn't work.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: positional variable question
by btrott (Parson) on Aug 27, 2000 at 06:22 UTC | |
by Limo (Scribe) on Aug 27, 2000 at 06:31 UTC | |
|
Re: positional variable question
by Anonymous Monk on Aug 27, 2000 at 06:54 UTC | |
|
RE: positional variable question
by Anonymous Monk on Aug 27, 2000 at 13:28 UTC | |
|
Re: positional variable question
by Anonymous Monk on Aug 28, 2000 at 01:21 UTC | |
|
Re: positional variable question
by Anonymous Monk on Aug 28, 2000 at 01:19 UTC | |
|
Re: positional variable question
by Anonymous Monk on Aug 27, 2000 at 11:06 UTC | |
|
RE: positional variable question
by Anonymous Monk on Aug 27, 2000 at 11:03 UTC |