I don't want to sound too harsh here, but you are missing many of the basics of Perl. You are using split(), arrays, regular expression matching, and "if" statements wrong. The only parts you have right are the ones you took from answers to your previous questions. You need to actually read your book and get familiar with the perl documentation if you want to Learn Perl. So far I can't see that you've learned anything but how to copy and paste.
I'll try to point you in the right direction anyways, though. Get one thing working at a time, and don't move on to the next thing until everything before it is doing what you want. I can tell you that "my @line = split ();" is not doing what you want it to. Read the perldoc for the split function.
In reply to Re^3: Help with split() function
by driver8
in thread Help with split() function
by negzero7
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |