($title, $rest) = split ' ', $_, 2;
@fields = split ' ',$rest;
last two lines === ($title, @fields) = split ' ';
which is almost ($title, @fields) = split;
foreach $keytitle (keys %TITLES) {
if ( grep /$keytitle/, $lookup ) {
$lookup is an array ref?
($im, $rptid, $edate, $rdate, $unused) = split ' ',
@{ $TITLES{$keytitle} }, 5 [1 2 3 4 5];
wazzat?!?
@{ $TITLES{$keytitle} } is an array.
split expects a string scalar there.
an array in such a context returns its length.
as for:
5 [1 2 3 4 5]
i have absolutely no idea what is going on with that.
how on earth does that compile?
exit;
exit?
where's the closing }s (curly braces) for the foreach and if?
this stuff can't possibly compile. are you cutting and pasting
code to the list selectively?
anyhoo, I suggest something like:
foreach $keytitle (keys %TITLES) {
if ( grep /$keytitle/, $lookup ) {
($im, $rptid, $edate, $rdate, $unused) = @{
$TITLES{$keytitle} };
Man is this cool stuff, BUT it really hurts my poor brain.
But it's fun, ain't it!?