W
Wesley Groleau
Actually, 95% of this is copied from something else
that supposedly works. (And from what I know of perl,
I thought it would work, too.)
But in a loop,
print $_ . "\n"; # first line is "0 HEAD"
# second is "1 SOUR hand-edited blah blah ...."
# Parse record
/^(\d+)\s+(@\S+@)?\s*(\S+)\s+(.*)/;
$level = $1; # Save the level number
$label = $2; # Save the label (if specified)
$tag = uc($3); # Uppercase the tag
$text = $4; # Save everything else
print " " x $level . "$label=$tag=$text\n";
ALL the variables in this print are uninitialized on every pass!
Am I missing something?
that supposedly works. (And from what I know of perl,
I thought it would work, too.)
But in a loop,
print $_ . "\n"; # first line is "0 HEAD"
# second is "1 SOUR hand-edited blah blah ...."
# Parse record
/^(\d+)\s+(@\S+@)?\s*(\S+)\s+(.*)/;
$level = $1; # Save the level number
$label = $2; # Save the label (if specified)
$tag = uc($3); # Uppercase the tag
$text = $4; # Save everything else
print " " x $level . "$label=$tag=$text\n";
ALL the variables in this print are uninitialized on every pass!
Am I missing something?