in reply to Re: Net::Netmask not working with scalar variable
in thread Net::Netmask not working with scalar variable

open is read only when mode is omitted. The 3 argument form of open is considered better practice:

open(my $fh, '<', "input.txt") or die $!

There is no reason to place a variable in double quotes unless you're interpolating it into a string, so the original poster's code was perfectly fine. To affect the symbol table you'd place 2 colons between barewords; like when you use a module or declare a package.