Use the debugger to step through your code, and I think you will see why it doesn't work. You could replace that entire unless {} with the first print statement inside it.
You need to remember the $line the first time you see it; storing it in your hash would be a good choice.
Update: s/until/unless/
In reply to Re: appending values based on criteria
by GotToBTru
in thread appending values based on criteria
by logeshwaran
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |