vr has asked for the wisdom of the Perl Monks concerning the following question:
Just discovered my script compiles OK with "$ _". Don't remember it mentioned in the manuals. Can't it lead to all sorts of funny things:
C:>perl -E "$ x = 1; say $ x; say qq($ x)" 1 1 C:>perl -E "$x = 1; $ x= 5; say qq($ x)" 5 C:>perl -E "$name = q(Fred); $debt = 50; say qq(You pay me ${debt}$ 00 + cents, $name, or else!)" You pay me 50 cents, Fred, or else!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: What for sigils were allowed to be separated from identifiers?
by Eily (Monsignor) on Nov 29, 2017 at 13:55 UTC | |
|
Re: What for sigils were allowed to be separated from identifiers?
by 1nickt (Canon) on Nov 29, 2017 at 13:47 UTC | |
|
Re: What for sigils were allowed to be separated from identifiers?
by Discipulus (Canon) on Nov 29, 2017 at 16:28 UTC | |
by Eily (Monsignor) on Nov 29, 2017 at 17:21 UTC | |
by vr (Curate) on Nov 29, 2017 at 17:00 UTC | |
|
Re: What for sigils were allowed to be separated from identifiers?
by Anonymous Monk on Nov 29, 2017 at 17:46 UTC | |
by Eily (Monsignor) on Nov 29, 2017 at 18:04 UTC |