while (chomp(my $temp=<INPUT>)){Don't do that. Do your chomp inside the loop. Otherwise, you'll get a warning (you do have warnings enabled, don't you?) when you reach the end and <INPUT> returns undef, since chomp expects a string, not undef.
In reply to Re: Regex error when [] occurs in file..
by ysth
in thread Regex error when [] occurs in file..
by why_bird
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |