I am having some problems with getopts in perl.
I use:
getopts("abc:ds:", \%options);
and I'm cheking the options with
if (defined $options{a})
where $options is the hash the options are written into.
After the options the user has to enter a file name, that I locate with $ARGV[0]. The problem is, that the user can not put the options after the file name, but only before.
So this is working:
skript.pl -a file.txt
And this is not working:
skript.pl file.txt -a
How can I escape this problem?
Thank you!
-Alex