AnsweredAssumed Answered

Not a HASH reference at IpInt.pm line 16 // Qualys Sample Perl Script Error

Question asked by Christopher Mercer on Aug 4, 2015

I'm getting the error mentioned in the subject trying to test out the filterscan.pl perl script. Using Windows 7 with Strawberry perl, I have all the dependencies noted in the documentation installed, the error I get is:

Not a HASH reference at IpInt.pm line 16, <FH> line 47.

 

The code referenced is:

sub new {

  my $class = ref($_[0]) || $_[0];

  no strict "refs";

  my $fields_ref = \%{"${class}::FIELDS"};

  my IpInt $self = [ $fields_ref ];

  $self->{integer} = undef;       #  <--------- Line 16

  $self->{ip} = undef;

  $self->{offset} = 2147483648;

  $self->{a} = 256 * 256 * 256;

  $self->{b} = 256 * 256;

  $self->{c} = 256;

  bless $self, $class;

  return $self;

}

Does this look like a quick fix that I'm unfamiliar with?

 

Thanks in advance!

 

*Edit: Quoted error

Outcomes