the chop is used to get rid of a semicolon that is always at the end of the pattern.
I would recommend either commenting that it is removing a semi-colon or using a pattern match to get rid of it, along the lines of $line =~ s/;$//;. Unless this is a script which has to execute in a specific amount of time, self-commenting code is much better than fast code.
------ We are the carpenters and bricklayers of the Information Age. The idea is a little like C++ templates, except not quite so brain-meltingly complicated. -- TheDamian, Exegesis 6 Please remember that I'm crufty and crochety. All opinions are purely mine and all code is untested, unless otherwise specified. |