On Tue, Feb 16, 2016 at 08:45:31PM +0100, shmem wrote: > >From the keyboard of Ed Avis [16.02.16,16:38]: > >It will also help to spot typos - I see that you do not see much value in > >that, because there would still be plenty of other typos and mistakes > >which are not detected. I disagree and feel that spotting mistakes such > >as @$ for $@ is useful. > > I am with Abigail on that: excellent candidates for perl critic. Conversely, one important use of 'use strict' is to spot typos in variable names. I think I'm in favour of emitting a warning each time a slot of a punctuation var typeglob is populated which doesn't have a current documented purpose. So use of '@$' would emit a single compile-time warning along the lines of: '@$' is a reserved punctuation variable while of course '$$' wouldn't. This wouldn't affect golf, japh's etc unless they are run with -w (which by their very nature, they probably aren't). perlvar would make it clear that any undocumented vars will emit this warning, and that they may acquire a new use in a future release of perl. -- You're only as old as you look.Thread Previous