star7 has asked for the wisdom of the Perl Monks concerning the following question:
file looks like "text....030525_00_07-2" (.:other characters) result: date:030525 instead of 25.05.2003 Where is the error ???? Thank you for your help. star 7.... my $datum0 = date_extra($file); textsformat("$entry/$file", $entry , $datum0); system "cat /home/dub/S/programming/perl/dp/textsformat.out +put >> $entry.tab"; }; }; closedir(DIR); }; }; sub date_extra { my $file0 = shift; my $date = substr($file0, 9,6); $date =~ s/(\d{2})(\d{2})(\{2})/$3\.$2\.20$1/; # why this command do +es not work return $date; }; ... ...
edited: Mon Jun 2 13:48:38 2003 by jeffa - title change (was: HELP - I can`t find error ...)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Need help with date regex
by Aristotle (Chancellor) on Jun 01, 2003 at 12:20 UTC | |
by star7 (Novice) on Jun 01, 2003 at 14:55 UTC | |
|
Re: Need help with date regex
by Juerd (Abbot) on Jun 01, 2003 at 12:19 UTC |