Thank you all for your help. It's been very useful. I will of course be talking to them about Perl as well.
That way when the tricks are being taught, I can at least say something like "and see here, that's the assignment operator, remember? So we're assigning a location to the window object, in other words telling the browser where to go" and have them feel less like they're just reproducing code and more like they're understanding it.