Hi,
foreach my $i (0..70){
printf("%3d %08b %2X %7d %08b %2X %7d %08b %2X %7d %08b %2X\n",
$i,$i,$i,
$i+71,$i+71,$i+71,
$i+142,$i+142,$i+142,
$i+213,$i+213,$i+213
Die 4. Spalte soll jedoch nur bis 255 gehen, hat jemand ne Idee?
255 - 213 ist 42. Und da das bekanntlich *die* Antwort ist, sorge dafuer, dass die Werte der letzten Zeile nur ausgegeben werden, wenn $i noch nicht groesser ist.
Dazu wirst du wohl zwei printfs draus machen muessen, um das letzte in eine Bedingung kapseln zu koennen.
MfG ChrisB
--
„This is the author's opinion, not necessarily that of Starbucks.“
„This is the author's opinion, not necessarily that of Starbucks.“