good chemistry is complicated, and a little bit messy -LW |
|
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
Congratulations, you're getting closer :) Your if logic is clear now, and correct, you're almost finished But, your code once again does not compile, and has not been tidied, and you're still not push-ing onto the array You attempt to compensate by using an index, but you're using it on the wrong variable
There is no @lin array, and @arr does not exist outside of the if block, where you assign to it, instead of pushing You need to increase the scope of @arr, by declaring it outside the while loop, the same as you did $fg You need to push $lin onto @arr Unsure of what i'm talking about? You should read the basic datatypes, three, Arrays: A Tutorial/Reference, Lexical scoping like a fox In reply to Re^5: to copy certain content in file & repeat it .
by Anonymous Monk
|
|