cajun has asked for the wisdom of the Perl Monks concerning the following question:
I wish to change the string:
Sat May 5 02:29:11 2001
Into
May 5 02:29:11
Regex is certainly not a stong point of mine and I've never attempted to use tagging before.my $now = time; $log_start=scalar localtime $now -1 * 86400; print "Log start = $log_start\n"; $log_start=~ /\w (\w\s+\d+\s\w)\s\d+/i; print "Modified Log start = $log_start\n";
This yeilds:
Use of uninitialized value in concatenation (.) at.....
Where am I going wrong here ?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
(ar0n) Re: Regex Tagging (newbie)
by ar0n (Priest) on May 05, 2001 at 15:52 UTC | |
by cajun (Chaplain) on May 05, 2001 at 16:15 UTC | |
|
Re: Regex Tagging (newbie)
by mincus (Chaplain) on May 05, 2001 at 16:15 UTC | |
|
Re: Regex Tagging (newbie)
by Daddio (Chaplain) on May 05, 2001 at 16:45 UTC | |
|
(crazyinsomniac) Re: Regex Tagging (newbie)
by crazyinsomniac (Prior) on May 06, 2001 at 04:32 UTC |