star7 has asked for the wisdom of the Perl Monks concerning the following question:
What i want is the following result: 0207010008.monday on my display Can you specify bugs in this code. I need your help.star7my $file = "textfile.020701_00:08"; my $time = substr($file, 9,12); $time =~ s/(\d{6})(\d{1})(\d{2})(\d{1})(\d{2})/"$1$3$5.monday"/; print "TIME: $time"
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: extract date from filename - need help
by Lachesis (Friar) on Aug 12, 2003 at 16:33 UTC | |
|
Re: extract date from filename - need help
by Not_a_Number (Prior) on Aug 12, 2003 at 17:34 UTC | |
|
Re: extract date from filename - need help
by sweetblood (Prior) on Aug 12, 2003 at 16:39 UTC |