Hello. Maybe should start by saying I have no idea what I'm doing. I have a Palm program that uses a script to translate movie times from a Yahoo website. But, Yahoo changed their website format..
I think I have traced the error to a date string...below is the string in the script that is generating the error
sub AddDate ( $ )
{
my ( $datestr ) = @_;
trim_whitespace ($datestr);
my $DID;
if ( !exists ( $hTempDates { $datestr }))
{
$DID = $nDate ++;
$hDates { $DID }{ Date } = $datestr;
$hTempDates { $datestr }{ ID } = $DID;
}
else
{
$DID = $hTempDates { $datestr }{ ID };
}
return $DID;
}
The line just above "return $DID;" is the line that is generating the error when I try to run the script.
I think it relates to the following string:(in what I think is a "sub-script" ? - yahoo.pm -specifically geared to translate the yahoo website into the script)
my $datestr;
if ( $header =~ /(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)(\
+w*)\s(\d\d),\s(\d\d\d\d)/s )
{
my $monthstr = $1 . $2;
my $day = $3;
my $year = $4;
my $month=$months{$monthstr};
$datestr = sprintf ( "%04d-%02d-%02d", $year, $month+1, $day );
}
my $DID = main::AddDate ( $datestr );
the yahoo website this utilizes is below (from zip code 29681. The following URL is the one that was used when the script was functioning properly.
http://movies.yahoo.com/showtimes/showtimes.html?z=29681&r=sim&m=&t=&a=&dt=0&s=tm&p=0
This URL is the one that is currently used to access the website:
http://movies.yahoo.com/showtimes/showtimes.html?z=29681&date=20040416&nt=10
First (original) URL diplayed only 1 week of dates, second you get to "choose" from up to 30 dates...
I am not sure how complex of a problem this is. My knowledge of PERL is so limited I have no idea where to start. I am willing to put in the work to figure out how to fix this - I just need some direction as to how....
I need to make sure to give credit to J. Robert Ray for writing the original script, but he is no longer supporting it..
Please let me know if I need to post/link to the whole script for a better understanding...and I'll need someone to tell me how. I've looked on the perlmonks help - but can't figure out how to post my whole code files..
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.