in reply to die in regexp
Therefore, to open the can of worms a little wider, consider whether loop control can reasonably be put in there, e.g. the following also worked as "expected" when I tested it on 5.6.1:
Update: And just how far can we take it? Can we define a sub in there? declare a variable with my? Or should we assume that anything not found in the documentation is unsupported. Personally I think it is better to document in a reliable context such as this can be proved to be.while(<>) { s/^\s*(\S)/$1 ne "#" ? $1 : next()/ge; # process non-comment line }
-M
Free your mind
|
|---|