If you use getline, it reads the entire line. So the entire print "Hello, World" text will be in the linha variable. You'll have to use string functions to remove the "print" and the double quotes.
...