When i run my script like so: 

C:\>perl script.pl -f file

It works fine. But, if I just do:

C:\>script.pl -f file

then I don't get any errors but getopts doesn't assign anything to $opt_f

This works just fine on perl 5.8 Windows XP, but it doesn't work on perl 5.12 on Windows 7.
There aren't any other versions of perl installed (its a new OS build).

Code:

use Getopt::Std;
our ($opt_f);
getopts('f:');
print "input file is: $opt_f \n";
print "$0\n


Run with:

C:\&gt; perl get.pl -f sadf
input file is: sadf
get.pl


Run without:

C:\&gt;get.pl -f sadf
input file is:


Nothing!

EDIT:  fixed and this question was a repeat...
http://stackoverflow.com/questions/1695188/how-do-i-make-perl-scripts-recognize-parameters-in-the-win32-cmd-console

The OP of that post figured it out.
I had to do the same but also recreate the assoc in the gui (in addition to in the reg and on the command line with ftype.)  


Question: Hostname resolution in a machine with multiple running eth ports
Answer: externally to whatever IN A entry you defined for the host name in its dns zone.

locally to whatever you want the hostname to resolve to.
to see how the resolver works, check out /etc/host.conf.
a default ubuntu host.conf is:

order hosts,bind
multi on


first line is the old style of saying "check /etc/hosts then query dns", second is the new style of saying the same thing.

suppose you have eth0:10.0.0.1, eth1:10.0.0.2, eth2:10.0.0.3, eth4:10.0.0.4 and a hostname of "phony" defined in /etc/hostname (talking ubuntu, other distros may use different config schemes here altho i doubt it)

you can have the following /etc/hosts entries:

10.0.0.1 phony 


then phony will resolve to 10.0.0.1 for local services
if you have something like this in /etc/hosts:

127.0.0.1 phony


phony will resolve to 127.0.0.1 

if you have no declaration of phony in /etc/hosts then resolver will query the dns caches defined in /etc/resolv.conf, using the "domain" and "search" setups to build a dns compliant record (host) name.

so if you want to control to what the hostname resolves to for your local services, define it in /etc/hosts. 

quick note: the hostname is normally just a dns label (that is, no "."). the domain name for your machine is normally defined in /etc/domainname