in reply to Writing current working directory to $variable
#!/usr/ug/bin/perl -w use strict; use Cwd; my $dir = getcwd; my $date_suffix; $dir =~ m!(\d{4})/(\d{4})! or die "In a bad directory: $dir"; $date_suffix = "$1.$2"; print "$date_suffix\n";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
RE: Re: Writing current working directory to $variable
by Limo (Scribe) on Aug 27, 2000 at 04:01 UTC |