i just want to call subroutines with the option.. is this right?
Yes, that's how you do it. Did you try it? What problems are you having with it. It would likely be quicker to try such a thing than to ask here and wait for an answer.
is it posible to call a subroutine in another subroutine with getopt:long?
What do you mean? I'm not sure what you are talking about. But it might be quicker to try it and then ask for help with any problems you might have.
| [reply] |
on your machine at home/work, you can type into a terminal window / command window:
perlodc Getopt::Long
to view the documentation in the file. ( I don't run windows, so there may be more to it on those platforms). Or you can browse to metacpan.org, search for the module you're interested in, and read the documentation there. It describes exactly the situation you're asking about.
I suspect you're thinking about interrupt handlers, where you're advised to keep the code short, not call too many other routines, to avoid complications. Nothing like that here, Your program can call A, B, or C, do various work for hours, and never even return to the main. It would be kind of perverted, but you could :-)
As Occam said: Entia non sunt multiplicanda praeter necessitatem.
| [reply] [d/l] |
| [reply] [d/l] [select] |