On Apr 14, 5:22 am, shawnhco...@gmail.com (Shawn H Corey) wrote:
C.DeRykus wrote:
And, here's the doozy for me as I tried remembering:
If the final value specified is not in the sequence that the
magical increment would produce, the sequence continues
until the next
C.DeRykus wrote:
And, here's the doozy for me as I tried remembering:
If the final value specified is not in the sequence that the
magical increment would produce, the sequence continues
until the next value is longer than the final value specified.
. As shown by the third for loop, incrementing the letters,
seems to give me the desired output in each loop.
What is going on here?
#!/usr/bin/perl
use warnings;
use strict;
my $letter = u;
for (u..z){
print $_ ;
}
print \n\n;
for ($_=u; $_ le z; $_++){
print
by the third for loop, incrementing the letters, seems to give
me the desired output in each loop.
What is going on here?
#!/usr/bin/perl
use warnings;
use strict;
my $letter = u;
for (u..z){
print $_ ;
}
print \n\n;
for ($_=u; $_ le z; $_++){
print $_ ;
}
le
as expected.
As shown by the third for loop, incrementing the letters, seems to give
me the desired output in each loop.
What is going on here?
#!/usr/bin/perl
use warnings;
use strict;
my $letter = u;
for (u..z){
print $_ ;
}
print \n\n;
for ($_=u; $_ le z; $_++){
print $_ ;
}
le
way
passed what I expected, and actually stops at yz and not z as
expected. As shown by the third for loop, incrementing the letters,
seems to give me the desired output in each loop.
What is going on here?
#!/usr/bin/perl
use warnings;
use strict;
my $letter = u
for loop actually counts way
passed what I expected, and actually stops at yz and not z as
expected. As shown by the third for loop, incrementing the letters,
seems to give me the desired output in each loop.
What is going on here?
#!/usr/bin/perl
use warnings;
use strict;
my $letter = u;
for (u
On Tuesday 13 Apr 2010 11:17:12 Magne Sandøy wrote:
[SNIP]
Hi again.
Does this mean this is a bug?
It's not a bug - this is how it works.
My point is to get z at the end. Using eq or lt wont work.
You need to evaluate the condition at the end of the loop instead of at the
beginning. Try
as
expected. As shown by the third for loop, incrementing the letters,
seems to give me the desired output in each loop.
What is going on here?
#!/usr/bin/perl
use warnings;
use strict;
my $letter = u;
for (u..z){
print $_ ;
}
print \n\n;
for ($_=u; $_ le z; $_++){
print
by the third for loop, incrementing the letters, seems to give
me the desired output in each loop.
What is going on here?
#!/usr/bin/perl
use warnings;
use strict;
my $letter = u;
for (u..z){
print $_ ;
}
print \n\n;
for ($_=u; $_ le z; $_++){
print $_ ;
}
print \n\n;
for(1
C.DeRykus wrote:
Clear as mud? Did you say 'Hell, no'...? Go then and
meditate on autoincrement magic, grasshopper. When
enlightenment comes, please report back and explain it
to us too...
Actually, it is because string-comparison operators order strings
differently than auto-increment.
at yz and not z as
expected. As shown by the third for loop, incrementing the letters,
seems to give me the desired output in each loop.
What is going on here?
#!/usr/bin/perl
use warnings;
use strict;
my $letter = u;
for (u..z){
print $_ ;
}
print \n\n;
for ($_=u; $_ le z; $_++){
print
2010/4/13 Magne Sandøy msan...@gmail.com:
Thanks for all the good info. I think I have a grasp on incrementing and
comparison, but now, what puzzles me, is the fact that when I use le less
than or equal, why does it actually increment the z? It is by then passed
the less than, and already at
On Apr 13, 8:54 am, shawnhco...@gmail.com (Shawn H Corey) wrote:
C.DeRykus wrote:
Clear as mud? Did you say 'Hell, no'...? Go then and
meditate on autoincrement magic, grasshopper. When
enlightenment comes, please report back and explain it
to us too...
Actually, it is because
Hi.
I'm new to perl, and I stumbled across a strange behavior in my for loop.
In the following code, the second for loop actually counts way passed
what I expected, and actually stops at yz and not z as expected.
As shown by the third for loop, incrementing the letters, seems to give
me
15 matches
Mail list logo