in reply to Re^4: Help me understand this code?
in thread Help me understand this code?
Further to Laurent_R's post: This is known as "autovivification" (see perlglossary) and is occurring with all the variables in the OPed code except $a and $b, which are pre-existing Perl special variables (see perlvar). Only package-global variables are created in this way, so this practice is officially Frowned Upon and is precluded by using strictures (see strict). In almost all cases, it's better to pre-declare lexical variables with my.
... what do the pounds in $t#$t#$t do?
They match against literal '#' characters in a string. They have no special function in a regex unless the /x regex modifier is used (see Modifiers), in which case # becomes a comment metacharacter/operator and must be escaped in some way to match against a literal character.
Give a man a fish: <%-(-(-(-<
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^6: Help me understand this code?
by ansabhailte (Novice) on May 22, 2015 at 16:13 UTC |