hi,
im trying to write a program that takes the daily topten from
showbizdata.com and formats it in an email. i have everything working great
except the format part. i tried the format function but it doesnt seem to
want to work in arrays and i am really bad at grabbing the stuff in scalar
(as a matter of fact, out of 20 tries, i have grabbed the topten or even
anything at all in scalar context for a total of 0 times =( ). so what i am
trying to do is this:
for (my $f=0; $f <= $#topten; $f++)
{
$rank[$f] = substr($topten[$f], 2, 3);
$title[$f] = substr($topten[$f], 7, 30);
$gross[$f] = substr($topten[$f], 50, 4);
$grosstodate[$f] = substr($topten[$f], 60, 8);
}
# *************************************************
for (my $g = 0; $g <= $#topten; $g++)
{
$topten[$g] = ("$rank[$g]", "\t", "$title[$g]", "\t", "$gross[$g]",
"\t", "$grosstodate[$g]", "\n");
}
# ***************************************************
print"@topten\n";
the substr grabs all work pretty much ok, but when i try to put them back in
topten (the lines between the comment lines) i get useless use of a string
in void context...i tried grouping the elements with only double-quotes
around the tab but it didnt work. any suggestions would be appreciated.
thanks
steve
---Steve