![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Programmer
Join Date: Feb 2005
Posts: 37
Rep Power: 0
![]() |
Strange
Ok so i was bored and I just started playing around with loops in perl so I did this first
#!C:/PERL/BIN/perl.exe -w
for($i = 0; $i < 50; $i++){
print ":: $i\n";
}#!C:/PERL/BIN/perl.exe -w
for($i = 0; $i < 50; $i++){
print ":: $i\n";
}
if($i == 50){
print ":: Begining the second loop...\n\n";
sleep(3);
for($me = 0x00; $me < 0xff; $me++){
print "~ $me\n";
}
}can anyone tell me why I got numbers instead of 0xff or something like that. |
|
|
|
|
|
#2 |
|
Expert Programmer
Join Date: Aug 2005
Location: Rotterdam, the Netherlands
Posts: 942
Rep Power: 3
![]() |
0xFF IS a number, with base 16 instead of base 10. You don't tell Perl to print it using base 16 instead of base 10.
|
|
|
|
|
|
#3 |
|
Programmer
Join Date: Feb 2005
Posts: 37
Rep Power: 0
![]() |
oh ok. thanks alot
|
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|