<div dir="ltr">Hi Madi,<br><br>There is data in a file, and you need the data in the file in order to give you some information you need to work with.<br><br>Obviously, you need an extraction routine to get the data in the file, assuming it is even remotely complicated. (If it's simple you could use split or unpack or regexen or something like that.)<br>
<br>You have two options:<br><br><ol><li>find the extraction routine that someone else created to get at the data (probably a CPAN module if a CPAN module exists for the data you want)</li><li>create your own extraction routine (which will probably just be a complicated composition of split or unpack or regexen, looping through lines in the file and building up various data structures for manipulation... or, if the data is really-gnarly-but-regular then maybe you'd use a formal parsing technique, like Parse::RecDescent)</li>
</ol>Option 1 is a research project for you to find what you need, if indeed it exists. Option 2 is elbow grease. Either way, please let us know how things work out.<br><br>(But you already enumerated options 1 and 2 in your own email, more or less. So... what exactly are you asking us for?)<br>
<br>Cheers,<br> - Richard<br><br><br><div class="gmail_quote">On Wed, Oct 8, 2008 at 7:28 PM, Madison Kelly <span dir="ltr"><<a href="mailto:linux@alteeve.com">linux@alteeve.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi all,<br>
<br>
I want to create a simple ... "library"? ... to provide data for a simple method do say:<br>
<br>
my $offset=&get_tz_offset("est", "1998-06-15");<br>
<br>
I've got the TZ data from: <a href="http://www.twinsun.com/tz/tz-link.htm" target="_blank">http://www.twinsun.com/tz/tz-link.htm</a><br>
<br>
It would need to be parsed though, and this I am hoping I can avoid by downloading an existing parser (I am not too concerned how this parser actually dumps data, I can hack that up). I just need something like: "For TZ X in date Y, the offset is Z".<br>
<br>
I am not sure if I will need the geographic data, as I am not trying to determine what the TZ is, that's given to me. I just need the offset for the given date.<br>
<br>
Any suggestions? Should I start hacking up a parser myself? Do I ask too many questions? :)<br>
<br>
Madi<br>
<br>
_______________________________________________<br>
toronto-pm mailing list<br>
<a href="mailto:toronto-pm@pm.org" target="_blank">toronto-pm@pm.org</a><br>
<a href="http://mail.pm.org/mailman/listinfo/toronto-pm" target="_blank">http://mail.pm.org/mailman/listinfo/toronto-pm</a><br>
</blockquote></div><br></div>