On Mon, Apr 19, 2004 at 03:34:13PM -0700, Sean O'Rourke wrote:
in a '/' is a regex, anything otherwise is a hash slice.

I don't understand. Could you give some examples? Is this in the context of bare /path/to/foo, even?

/foo/ # trailing slash -- so it's a regexp (m/foo/) /foo\/bar/ # trailing slash -- syntax error (m/foo/ bar/) /foo/a # hash-path -- no trailing slash ($_.{'foo'}{'a'}) /foo\/bar # hash-path -- no trailing slash ($_.{'foo/bar'}) /foo\/ # hash-path -- no trailing slash ($_.{'foo/'})

I think this is highly ambiguous.


$x = /foo * $bar/and +bar();

would that be:

$x = m/foo* $bar/ && (+bar());
 or
$x = $_.{'foo'} * $bar.{'and'} + bar();

?

As much as I see the appeal of this syntax, the / is simply too heavily used already.

--
Matthijs van Duin  --  May the Forth be with you!

Reply via email to