Hallo,
Aber ich dachte es ist eine lokale Variable nur in Unterprogrammen und nicht in einer Anweisung (Z.B. if oder for-Schleife!) ???
perldoc -f my
A my' declares the listed variables to be local (lexically) to the enclosing block, file, or
eval'. [...]
Das kann der Block einer for-Schleife, genau wie der eines do, ..., oder
sogar ein freistehender Block sein.
Gruß Kai