images/napali.gifNapali.ch /perl

..

$.

Interne Variable Zaehler

Beispiele:

while () {
    unless (/some regex/) {
      warn "Error in line $.\n";
      next;
    }

    # http://www.perl.com/pub/a/2004/06/18/variables.html
}

Constanten
use constant SECONDS_PER_DAY => 60 * 60 * 24;

$!

perl -e 'print $!=$_, "\n" for ( 0 .. 128 )'