in reply to Re^2: Please Review First Program: Random Password Generator
in thread Please Review First Program: Random Password Generator
you use q[ ... ] with symbols [ and ] in there. Why does that not cause a syntax error?
For the why I can only answer with a generic: because Perl's parser is (mostly :) well thought out and implemented.
I assume that the parser must be doing a maximal munch at that point.
The 'balanced quoting' facilities of Perl are one (of many) things that I really miss in other languages. They save so much mess & hassle with escaping stuff.
Mind you, I abhor their overuse in Perl--eg. q[] instead of a simple ''--almost as much as I miss them when they aren't available.
And what does that #' comment at the line end mean to you?
That's simply a crutch for my editor's less capable syntax highlighting parser. It see's the single quote embedded in the construct and starts highlighting the following text as a string constant, but doesn't stop until it sees a second single quote.
The comment prevents that erroneous highlighting from running on to subsequent lines.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Please Review First Program: Random Password Generator
by ikegami (Patriarch) on Feb 05, 2011 at 05:31 UTC |