in reply to split and matching

I probably wouldn't use perl for this, since it's a straightforward grep task. Maybe this will help you see what you need to do:

grep -v 'sno=;' <infile | grep -v 'tail->tail' | grep -v 'head->head' +>outfile

(Yes, I know those can be combined into a single grep with a more complicated test, but so can they be combined into a single regex in Perl. To me, a pipeline of simple greps is easier to create and to understand later.)

Aaron B.
My Woefully Neglected Blog, where I occasionally mention Perl.