Help for this page

Select Code to Download


  1. or download this
    class Float
      alias :old_divide :/ 
    ...
        other == 0 ? nil : old_divide(other)
      end
    end
    
  2. or download this
    class MyFloat < Float
      def MyFloat.new(from)
    ...
      end
    end
    MyFloat.new(4) / 0 # nil
    
  3. or download this
    use warnings;
    
    ...
        no warnings qw/uninitialized/;
        $foo = 5 - $qux;
    }