in reply to Re^7: Formatting
in thread Formatting

John,
Ok, i'll try that again.

Anyways, the script is like 95% complete, all i have to implement now (which i have partially done) is an alternate $tag, depending on whether there is a special character in every block.

I have done this with a subroutine:

sub piper_end() {

my $tag = { K => { open => '%',
close => '',
block => 1,
block_open => "<c>\n".'<p>',
block_close => '</p>'."\n<t>"
},
R => { open => '<li>',
close => '</li>'."\n",
block => 1,
block_open => '<r>'."\n",
block_close => '</then>'."\n".'</ifflag>'."\n".'</r>'."\n</t>\n</c>"
},
S => { open => '<set name="temant">',
close => '</set>',
block => 0
},
F => { open => '<setflag param="',
close => '"/>',
block => 0,
}
};

return $tag;
}

Now if a $style tag matches this special character (I), it will call upon the subroutine to update a specific block_close (for R). Is this method alright?

Thanks again,
Marcos