in reply to Teaching aid pragmas (perlite?)

I've often wished for a "training perl" for the llama class that disabled the return value of chomp, forbid the use of map and grep in a void context, and removed array slices, amongst other things.

-- Randal L. Schwartz, Perl hacker
Be sure to read my standard disclaimer if this is a reply.

Replies are listed 'Best First'.
Re^2: Teaching aid pragmas (perlite?)
by jhourcle (Prior) on Mar 28, 2006 at 19:25 UTC

    I'd be wary of changing the behavior of return values, as it seems like the sort of thing that someone would write code expecting one behavior on a 'user friendly' version, and then be surprised when their code broke horribly when using a 'full' version of Perl.

    Not quite a perl example, but I worked at my university's computer support center during my undergrad. The engineering school had aliased 'rm' to 'rm -i' on all of the boxes they maintained ... someone had an account on one of our 'normal' systems, and to clean up their directory typed 'rm *', expecting it to behave like 'rm -i *'. Needless to say, they were not happy to have lost the training wheels, as our policy on backups was for catastrophic recovery, not as an 'undelete'.