On 6/3/07, Jonathan Lang [EMAIL PROTECTED] wrote:
Chas Owens wrote:
Jonathan Lang wrote:
Is there any reason why we can't simply define '$a x $n' as being
shorthand for 'cat($a xx $n)'? In what way does the former differ
from the latter, other than the use of a Whatever in place of $n?
Chas Owens wrote:
Jonathan Lang wrote:
Chas Owens wrote:
Jonathan Lang wrote:
Is there any reason why we can't simply define '$a x $n' as being
shorthand for 'cat($a xx $n)'? In what way does the former differ
from the latter, other than the use of a Whatever in place of $n?
$a
On 6/3/07, Jonathan Lang [EMAIL PROTECTED] wrote:
Chas Owens wrote:
Jonathan Lang wrote:
Chas Owens wrote:
Jonathan Lang wrote:
Is there any reason why we can't simply define '$a x $n' as being
shorthand for 'cat($a xx $n)'? In what way does the former differ
from the latter,
Chas Owens wrote:
I am almost certain that the following code is in list context.
pugs my @a = '-' x 5, 'foo', '-' x 5;
pugs @a
(-, foo, -)
pugs my @b = cat('-' xx 5), 'foo', cat('-' xx 5)
(-, -, -, -, -, foo, -, -, -, -, -)
However, it does seem that Pug's version of cat does not
Is item context what we're calling scalar these days, or something else?
On 6/3/07, Jonathan Lang [EMAIL PROTECTED] wrote:
Chas Owens wrote:
I am almost certain that the following code is in list context.
pugs my @a = '-' x 5, 'foo', '-' x 5;
pugs @a
(-, foo, -)
pugs my @b =
Mark J. Reed wrote:
Is item context what we're calling scalar these days, or something else?
According to S03, it does indeed appear that item context is the
current terminology for what perl 5 called scalar context:
The item contextualizer
item foo()
The new name for Perl 5's scalar
On 6/3/07, Jonathan Lang [EMAIL PROTECTED] wrote:
snip
From what you're saying, I get the impression that you think that '-'
x 5 ought to produce a single string of five dashes regardless of
whether the context is item or list. Correct? (Note: I'm not asking
about what the spec says, since
Chas Owens wrote:
The current Perl 5 behavior is
[EMAIL PROTECTED]:~$ perl -le 'my @a = (- x 5, foo, - x 5); print @a'
- foo -
[EMAIL PROTECTED]:~$ perl -le 'my @a = ((-) x 5, foo, (-) x 5); print
@a'
- - - - - foo - - - - -
I am against anything other than that for x or xx without a
Is there any reason why we can't simply define '$a x $n' as being
shorthand for 'cat($a xx $n)'? In what way does the former differ
from the latter, other than the use of a Whatever in place of $n?
--
Jonathan Dataweaver Lang
On 6/2/07, Jonathan Lang [EMAIL PROTECTED] wrote:
Is there any reason why we can't simply define '$a x $n' as being
shorthand for 'cat($a xx $n)'? In what way does the former differ
from the latter, other than the use of a Whatever in place of $n?
--
Jonathan Dataweaver Lang
$a x $n is
Chas Owens wrote:
Jonathan Lang wrote:
Is there any reason why we can't simply define '$a x $n' as being
shorthand for 'cat($a xx $n)'? In what way does the former differ
from the latter, other than the use of a Whatever in place of $n?
$a x $n is equivalent to join '', $a xx $n, but that
11 matches
Mail list logo