Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask

Re: err_watch for when your errors are growing like hair or...

by chanio (Priest)
on Jan 22, 2006 at 16:55 UTC ( #524806=note: print w/replies, xml ) Need Help??

in reply to err_watch for when your errors are growing like hair or...

It would be nice if you could parametrize data to: adapt to other log formats, and to other locales (just a different .ini file).

Use Term::ANSIColor for color coding. A color shift says more than 1K. words!

Perhaps, using this code, if you only need the days of the week locale...

perl -MPOSIX -Mlocale -e' ## GET LOCAL DATES AND NAMES my ($tnow,$gday)=(time,int(60*60*24)); ## TODAY IN SECONDS, SECONDS I +N ONE DAY (4 ADDING) my %wd; $wd{(localtime($tnow+($gday*$_)))[6]}=strftime("%a",localtime(($gday*$ +_)+$tnow)) foreach (0..6); ## RELATE +NUM. OF DAY OF THE WEEK WITH ITS NAME print("$wd{$_}, ") foreach (sort(keys(%wd))); ## DISPLAY NAMES IN ORDE +R (SEE LAST LINE) print $/ ## (WEEK DAYS IN SPANISH) __END__ dom, lun, mar, mi, jue, vie, sb, '

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://524806]
[Corion]: A good weekstart to everybody!

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (7)
As of 2018-06-18 08:18 GMT
Find Nodes?
    Voting Booth?
    Should cpanminus be part of the standard Perl release?

    Results (109 votes). Check out past polls.