You add chomp($file).
print "$num_entry\n";Also you are printing $num_entry which is not declared or used anywhere, check it.
Curly brace missing in your coding.
You coding works fine for me if i add that curly brace.
updated
Regards,
Anniyan
(CREATED in HELL by DEVIL to s|EVILS|GOODS|g in WORLD)
In reply to Re: pattern match a name from stdin
by anniyan
in thread pattern match a name from stdin
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |