Hmm.. here you are saying
print "$#lines\n";
but in the OP
@line=split(/$variable/,$_);
Maybe you mean @lines? or perhaps $#line?
If you include
use warnings;
at the top of your program, perl helps you emitting a warning if, by typo, you are using a variable only once.
In reply to Re^3: Split Help
by shmem
in thread Split Help
by de2425
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |