If you had actually read the original post, you might have noticed that the OP did, in fact, create a module called set.pm. The syntax use set my $y =666; is actually valid, but it's also useless because $y goes out of scope immediately. Arguably it should be disallowed, but nobody cares.