Luke Palmer wrote:
>On Sun, 22 Sep 2002, Markus Laire wrote:
>You know, the idea that square brackets are the only things that can make
>lists is starting to really appeal to me. Similar for squiggles and
>
>So parens really do provide grouping, not list constructing. Thus, this
>can stay:
On Sun, 22 Sep 2002, Markus Laire wrote:
> > On Sat, Sep 21, 2002 at 11:36:49AM -0600, John Williams wrote:
> > > On Sat, 21 Sep 2002, Jonathan Scott Duff wrote:
> > >
> > > Anyway, (7) or (3+4) should yield a number, not a list, because
> > > otherwise every math expression will break.
> >
> >
> On Sat, Sep 21, 2002 at 11:36:49AM -0600, John Williams wrote:
> > On Sat, 21 Sep 2002, Jonathan Scott Duff wrote:
> >
> > Anyway, (7) or (3+4) should yield a number, not a list, because
> > otherwise every math expression will break.
>
> Why can't perl be smart enough to figure out what we me
On Wed, Sep 18, 2002 at 05:01:35PM +0200, Damian Conway wrote:
> Steve Fink wrote:
>
> >What possible outputs are legal for this:
> >
> > "aaa" =~ /( a { print 1 } | a { print 2 })* { print "\n" } x/
>
> Unless Larry specifies a required semantics, there are potentially very
> many acceptable o
On 21 Sep 2002, Smylers wrote:
> Luke Palmer wrote:
>
> > my @v = $( &func() );
> >
> > Would provide scalar context. But then assign it to a list...
>
> In the course of reading that I developed a concern about memory usage
> when trying to find the size of arrays. As I understand it th
On 21 Sep 2002, Smylers wrote:
> Larry Wall wrote:
>
> > On 20 Sep 2002, Aaron Sherman wrote:
> >
> > : Does that mean that I can't
> > :
> > : for $x -> $_ {
> > : for $y -> $z {
> > : print "$_, $z\n";
> > : }
> > : }
> > :
> > : And exp
On Mon, Sep 16, 2002 at 10:32:17AM +0300, Markus Laire wrote:
> On 15 Sep 2002 at 22:41, Steve Fink wrote:
>
> Your code seems to backtrack to the beginning at every failure. First
> code only backtracks one char at time.
> > Huh? What implementation is that? I think my naive implementation
> >
On Sat, Sep 21, 2002 at 11:36:49AM -0600, John Williams wrote:
> On Sat, 21 Sep 2002, Jonathan Scott Duff wrote:
> > > I can't tell whether (7).length is asking for the length
> > > of 7 or the length of a list, but I would be badly surprised if
> > > (3+4).pow(2) returned 1 instead of 49.
> >
> >
On Sat, Sep 21, 2002 at 10:05:50AM -, Smylers wrote:
> Larry Wall wrote:
>
> > On 20 Sep 2002, Aaron Sherman wrote:
> >
> > : Does that mean that I can't
> > :
> > : for $x -> $_ {
> > : for $y -> $z {
> > : print "$_, $z\n";
> > : }
> > :
On 21 Sep 2002, Smylers wrote:
>
> Does that matter? This example is fairly contrived, and anybody
> actually concerned about this can always use:
>
> $num = @massive.length;
>
> So perhaps this isn't a problem.
$num = +@massive;
would also set $num to the length, not the ref.
~ John Willi
On Sat, 21 Sep 2002, Jonathan Scott Duff wrote:
> > I can't tell whether (7).length is asking for the length
> > of 7 or the length of a list, but I would be badly surprised if
> > (3+4).pow(2) returned 1 instead of 49.
>
> So, you expect 7.pow(2) to work? I'd expect it to be an error (this
> isn
On Fri, Sep 20, 2002 at 09:46:58PM -0600, John Williams wrote:
> On Fri, 20 Sep 2002, Jonathan Scott Duff wrote:
> > > But I cannot tell whether (7) is list context or numeric context,
> >
> > Nope, you can't tell without the surrounding context:
> >
> > (7) + 0;# numeric
> > $a =
Tanton Gibbs wrote:
> (7) == 7
>
> why? Otherwise, we couldn't use parens for mathematical expressions
But as Luke Palmer pointed about above, this syntax would make
square brackets redundant, so we could now use those unambiguously for
overriding mathematical precedence ...
(Sorry about t
Luke Palmer wrote:
> my @v = $( &func() );
>
> Would provide scalar context. But then assign it to a list...
In the course of reading that I developed a concern about memory usage
when trying to find the size of arrays. As I understand it the Perl 5
syntax for discovering the number of
Larry Wall wrote:
> On 20 Sep 2002, Aaron Sherman wrote:
>
> : Does that mean that I can't
> :
> : for $x -> $_ {
> : for $y -> $z {
> : print "$_, $z\n";
> : }
> : }
> :
> : And expect to get different values?
>
> That's correct. N
Steve Tolkin wrote:
> { @$appendline =~ s//
> I think this needs a backslash in front of the < symbol, and a space
> after in_marker, i.e. it should be:
>
> { @$appendline =~ s//\;
Isn't the replacement part of a substitution is still a string?
Having the replacement being a rule would
16 matches
Mail list logo