by jolmg · 7y ago · 0 comments
<line-condition> { <code> }
That's unusual enough among programming languages to call it odd. Being able to do stuff like if (/some-pattern/) { ...
and have the regex be evaluated like a condition where it matches with the current line implicitly is also pretty unique. if (/some-pattern/) { ...
This isn't really unique when you consider perl. while (<>) {
if (/pattern/) {
This does the same. Awk simply has the implicit loop.