Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: Epoch time conversion in CSV

by NetWallah (Abbot)
on Sep 25, 2012 at 15:35 UTC ( #995575=note: print w/ replies, xml ) Need Help??


in reply to Epoch time conversion in CSV

Here is a hint:

print scalar(localtime(1345752662));

             I hope life isn't a big joke, because I don't get it.
                   -SNL


Comment on Re: Epoch time conversion in CSV
Download Code
Re^2: Epoch time conversion in CSV
by theneil (Novice) on Sep 25, 2012 at 15:42 UTC
    How would I loop through the whole document alerts.csv?
          How would I loop through the whole document alerts.csv?

      Dude!,
      The same way you'd loop over any other data set.

      while(my $line=<DATA>){ # stuff goes here. }
      If you wanted to convert the fields and write them back to the log file in question I'd suggest you give a look at Tie::File.


      Peter L. Berghold -- Unix Professional
      Peter -at- Berghold -dot- Net; AOL IM redcowdawg Yahoo IM: blue_cowdawg

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (10)
As of 2015-07-01 23:56 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (25 votes), past polls