some background for those still interested:
It's about how to deal with continuation lines, i.e. not to eval a single line but a chunk of lines, and how to signal what the author wants.
The standard Perl "REPL"¹, the debugger, has cumbersome way to signal continuation lines, one has to finish a line with a backspaceslash ²:
lanx@lanx-1005HA:~$ perl -de0 #... DB<1> while (1) {\ cont: print $x++;\ cont: last if $x >3;\ cont: } 0123 DB<2>
Other REPL's try to make the distinction by using more than one semicolon, b/c semicolons are safe from other interpretations and a natural choice at the end of the line.
I remember BUK talking about this. (IIRC only eval after two semicolons)
I personally patched the debugger in a way to only eval code without syntax error and to continue reading lines till all expressions are closed.
But after an unintended bug you might be trapped in an endless loop, that's why I added ;; as emergency exit.
lanx@lanx-1005HA:~$ ipl # ... DB<100> while (1) { print $x++ last if $x> 3; } ;; syntax error at (eval 22)[multi_perl5db.pl:644] line 2, near "++last " DB<101> while (1) { print $x++; last if $x> 3; } 0123 DB<102>
as you can see I "forgot" the semicolon after the second line and was trapped in an endless loop.
Others don't wont to rely on such a heavy tool like perl5db.pl and realize a simple REPL with less than 10 lines only.
HTH!
Cheers Rolf
(addicted to the Perl Programming Language and ☆☆☆☆ :)
Je suis Charlie!
¹) quoted since the debugger doesn't print by default
²) typo corrected (thx to Midlifexis )
In reply to Re^4: What Is the Purpose of a Line with only Two Semi-Colons? (background)
by LanX
in thread What Is the Purpose of a Line with only Two Semi-Colons?
by 1nickt
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |