On October 16th Damian Conway wrote:
> If the contents are not a number, they are interpreted as an upper-case
> Unicode character name, or as a lower-case XHTML entity. For example:
One more problem: not all XHTML entities are lower-case. For example:
Ð Þ É Θ
For a complete list, see:
ht
Tom Christiansen writes:
> >Yes, but 'eval' has the semantics "run this code but don't let it play
> >any funny tricks on me, like dying or anything", where 'do {...} while'
> >has the semantics "a while loop that evaluates its condition at the
> >end". There's no obvious reason why 'return'
Tom Christiansen writes:
> >However, I really don't want to see 'return' become a kind of 'last'
> >for do{}. How would I return from a subroutine from within a do loop?
>
> You already can't do that (as it were) from within an eval.
Yes, but 'eval' has the semantics "run this code but don'
Peter Scott writes:
> I dunno, maybe a last in a do block whose value is used by
> something should be a syntax error. We're talking about code like
>
> $x += do { $y = get_num; last if $y == 99; $y } while defined $y;
>
> right? *Shudder*
Yes, but we're also talking about code like
Jonathan Scott Duff writes:
> On Thu, Aug 31, 2000 at 01:26:26PM -0500, Christopher J. Madsen wrote:
> > I too would like to see last, next, & redo work with do loops.
>
> *Only* do loops or do blocks in general? And what should they do?
Well, I suppose that for cons
Tom Christiansen writes:
> >>One could argue that do{} should take return so it might have a value,
> >>but this will definitely annoy the C programmers.
>
> >So what.
>
> So what is that it *already* annoys us, which is *why* we would like to
> last out of a do. Perhaps you should be a
Steven W McDougall writes:
> 4. Regular expressions
> It seems like an RE match should be atomic, because it hard to imagine
> it executing sensibly if the target string changes during the match.
> But then we have
>
> Thread1 Thread2
> $a =~ s/.../.../e; $a
Steven W McDougall writes:
> Does Perl6 support Symmetric MultiProcessing (SMP)?
> 1 No
> 1.2 Cons
> We don't get SMP. SMP is a nyah, nyah issue. Without SMP, Perl will
> have trouble outgrowing its toy/scripting language reputation.
You left out the biggest con of not having preemptive th
Jonathan Scott Duff writes:
> On Fri, Aug 18, 2000 at 10:12:02AM -0500, Christopher J. Madsen wrote:
> > foreach $_ $index (@array) { ... }
> >
> > It's only 3 characters, and it makes for a nice consistant syntax.
>
> Yep, but it might also be a sour
> $hour = 0 .. 24
Did you mean 0 .. 23?
> $wday = 1 .. 7 # 1 == Sunday, 7 == Saturday
> I'm still a little uneasy about C<$wday> starting with 1 == Sunday, just
> because Monday seems like the first day of the week to me. But I'm not
> the one writing the calendars, and it
Jonathan Scott Duff writes:
> Excellent summary of why an explicit index is a Good Thing as compared
> to the programmer doing it himself. I think the syntax would need to
> be different though, how do you use implicit $_ and an index? (Don't
> Do That is not an answer because people will wa
David L. Nicol writes:
> Why not use an explicit perl5 counter?
>
> my $index;
> foreach $item (@array){ $index++;
> print $item, " is at index ", $index, "\n";
> }
Well, one reason is that your example doesn't work (it starts the
index at 1 instead of 0). You'd need
I don't see why this should be an implicit counter. This (might)
cause extra work for every foreach loop in every program (depending on
how foreach is implemented).
Why not use an explicit counter instead? Something like
foreach $item $index (@array) {
print $item, " is at index ", $
13 matches
Mail list logo