Does Ruby suggest the Perl equivalent to use strict?

I mean in Ruby there is no my . I found use strict in Perl to provide very good typo protection.

+6
source share
1 answer

Strict pragma does three things in Perl. Two of these items are to ban the use of symbolic links and "simple words." Ruby does not use support these features, so this is not a problem.

Another feature of strict pragma is to avoid creating random global variables at every mention. In Ruby globals, see
different from other variables (leading $), so this is not really a problem. Local variables must be assigned before use, as the Ruby method is declared. This solves the same problem.
strict pragma-pens for Perl.

Source: https://groups.google.com/forum/?fromgroups#!topic/ruby-talk-google/PiRnWplvGDw

+15
source

All Articles