$text is the ininitialized variable. It isn't set to anything, ever. Warnings and strict would have been helpful to you. I think you want: s/^go/\//g and $count++ while(<FILE>);The way you coded that, $count is the number of substitutions, not the number of lines in the file.
I also think you want to chomp the filename you get from STDIN.
After Compline,
Zaxo
In reply to Re: Matching Question
by Zaxo
in thread Matching Question
by curtisb
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |