Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options

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]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (2)
As of 2018-02-23 00:57 GMT
Find Nodes?
    Voting Booth?
    When it is dark outside I am happiest to see ...

    Results (300 votes). Check out past polls.