In the case of grep, you're not assigning a list to anything. What you're assigning to the scalar is the return value from grep, which will be a list in list context and a scalar in scalar context.
I fail to see how the scalar return value from grep when called in scalar context is equivalent to the list returned by a slice.
In reply to Re^7: Scalar context of slice ("list")
by mr_mischief
in thread Scalar context of slice
by thenaz
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |