Nathan Torkington wrote:
> 
> Hmm.  This is exactly the same situation as with chomp() and somehow
> chomp() can tell the difference between:
> 
>   $_ = "hi\n";
>   chomp;
> 
> and
> 
>   @strings = ();
>   chomp @strings;

Good point. I was looking at it from the general "What's wrong with how
@arrays are parsed as arguments?" standpoint, not from a "How can we fix
this specific function?" standpoint.

> But chomp seems to use @ as its indicator.  You can't say:
> 
>   $_ = $a = "hi\n";
>   chomp $_, $a;
> 
> If it sees that $, it figures its chomp SCALAR.
> 
> I'm unsure if this is adequate for match, but it might be.

Maybe. Behavior like chomp() is what we're looking for, so on ths
surface this seems to work. But people might also want to do:

    match /string/, $one, $two, $three;

However, being able to take @ or $;$$$$... seems like a possibility. In
fact, chomp not doing this might be a "bug".

> >    2. I don't think it's even closely tied to this RFC itself.
> 
> This is the mindset that worries me: every edge case needs another
> RFC.  Look to what's already in Perl: does anything else behave like
> this?  How does it get around it?  Can we co-opt the way it works?

Fair enough. Again, I was looking at it from a generalist standpoint.

-Nate

Reply via email to