One problem is that you have written '\t' in place of "\t". These mean different things in Perl. Double quotes interpolate, whereas single quotes do not. This means '\t' yields the literal string of a backslash followed by a t; "\t" yields a tab character. There is a list of escape sequences in the link I have provided.
In reply to Re^4: compare lines within a file
by kennethk
in thread compare lines within a file
by garyboyd
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |