Answer:
rub me and a genie might appear
I am bought by the yard but worn by the foot. What am I?
I cannot be other than what I am, until the man who made me dies. Power and glory will fall to me, only when he last closes his eyes.
The more you take of me the more you leave behind.
I'm not really more than holes tied to more holes; I'm strong as good steel, though not as stiff as a pole.
Written on with words of white, Has the color of the night, Is the teacher's best delight, And a student's daily fright