in reply to Adding Pages
Not quite sure what you're trying to do. It would be helpful if you supplied (a small but representative sample of) your input data, and the output that you would expect from this.
However, I can tell you that this line:
$. % $lines == 0 ? <> : print "\n";is wrong.
First, since you have read the whole file into an array (@lines), and then you iterate over this array in a foreach loop, you can't use the input line number ($.).
Second, you use a variable $lines, which has not been initialised anywhere in your code. I imagine you mean $viewlines.
Update: Corrected typo (s/$!/$./;). Thanks Laurent_R.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Adding Pages
by PilotinControl (Pilgrim) on Mar 19, 2014 at 21:27 UTC |