belg4mit has asked for the wisdom of the Perl Monks concerning the following question:

It occured to me earlier that while Perl6 is introducing the yada-yada-yada operator ..., this is already the flip-flop operator! No problem, we can handle that. Context to the rescue. EXPR ... EXPR is different than ... in void context (yada**3 would be in void right?). Okay, but it seems part of the design philosophy of Perl6 is to mop up some ambiguity, not add it e.g. <> and glob. So what do you know/think about this?

PS> It is possible I am blind but I did not find this anywhere around here, nor in an Exegsis nor Apocalypse.

--
perl -pe "s/\b;([mnst])/'\1/mg"

Replies are listed 'Best First'.
•Re: Operators: sandals and Seinfield
by merlyn (Sage) on Apr 10, 2002 at 22:29 UTC
    dot-dot-dot will just join the ranks of punctuation that means something different depending on whether you're looking for an operator or looking for an operand. See the explanation in my now famous On Parsing Perl node. There's nothing more weird about it than the half dozen other operators that are parse-state dependent.

    -- Randal L. Schwartz, Perl hacker

(RhetTbull) Re: Operators: sandals and Seinfield
by RhetTbull (Curate) on Apr 11, 2002 at 00:27 UTC

      Interestingly enough, the Yada::Yada::Yada module has exactly this problem; that is, it incorrectly assumes that all ... are yada yada yadas. For example:

      perl -MYada::Yada::Yada -ne 'print if /foo/.../bar/'

      Incorrectly warns of being "not implemented" and acts like print if /foo/; Methinks it needs a bit more than Filter::Simple to accomplish this problem.

      perl -pe '"I lo*`+$^X$\"$]!$/"=~m%(.*)%s;$_=$1;y^`+*^e v^#$&V"+@( NO CARRIER'