Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: Parse and Summarise Big Brother logs

by chanio (Priest)
on Apr 17, 2006 at 21:49 UTC ( #543932=note: print w/ replies, xml ) Need Help??


in reply to Parse and Summarise Big Brother logs

Nice!

...
chomp(my $today = `date +%Y-%m-%d`);
...
You could...
my (@date)=((localtime())[5,4,3]); $date[0]+=1900; $date[1]++; my ($today)=sprintf("%4i-%02i-%02i",@date);
THX!


Comment on Re: Parse and Summarise Big Brother logs
Download Code
Re^2: Parse and Summarise Big Brother logs
by CharlesClarkson (Curate) on Jun 18, 2006 at 05:18 UTC

    How about strftime()?

    use POSIX 'strftime'; print strftime '%Y-%m-%d', localtime();
    HTH,
    Charles

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://543932]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (10)
As of 2014-12-18 05:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (41 votes), past polls