Perl: Diamon operator: <> , $_, the default variable
The Diamond operator is almost exclusively used in a while-loop. It allows us to iterate over the rows in all the files given on the command line. Diamond – using $, the default variable We can make the above example even more compact by remembering that certain operation in Perl will use $, the default variable of Perl, if no explicit variable is given. use strict; use warnings; while () { print if /perl/; } Read More →