I never remember this stuff, so it is collected here to accelerate my frequent look-ups of it.
Perl 'my' and 'local'
More in this relevant PerlMonks node.
- Declare variable with scope and lifetime equal to containing block, ie what C calls 'auto'.
- Import previously-declared variable into the scope containing the 'local' - ie no new variable is created. However any change to variable's value within the block will be discarded at end of block, as if the old value had been restored immediately after the end of the block.
GNU Make Automatic Variables
More detail in the relevant GNU Make documentation.
- Filename of the target of the rule.
- Name of the first prerequisite.
- The names of all the prerequisites that are newer than the target.
- The names of all the prerequisites of the target.
- The stem with which an implicit rule matches.
mtime versus ctime
Mnemonic: Change Data but Modify Metadata.
- Change to file data, or creation/deletion of files in a dir.
- Change to file metadata (inode).
- Expands to the positional parameters, starting from one. Inside double quotes, expands to a single word with the value of each parameter separated by the first character of the IFS special variable.
- Expands to the positional parameters, starting from one. Inside double quotes, each parameter expands to a separate word.