[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Edlug Archive Jan 2003 ]

[edlug] getopt in perl

Hi there,
Can any of you perl wizards out there tell me how I can get all the
command line options given to a program in one go.
e.g. If I call my perl program test.pl and at the command line type:
test.pl -a some randome stuff -p -q
I want to run test.pl and have the program grab the string of options so I
can do something with it. Basicaly my perl script is just going to run
another program, in this case uname, which is offending unison by giving
Linux as the operating system and not linux. I want it to run uname with
any other options it is given too and then parse the output and change
Linux to linux.
Thanks in advance,

Alex Zelter,
Fungal Cell Biology Group
Agricultural College
West Mains Road
Edinburgh EH9 3JG

Tel. 44-(0)-131-535-4178
 or  44-(0)-131-535-4152
FAX. 44-(0)-131-667-2601
Website: http://www.fungalcell.org
Email: azelter@xxx.xxx.xxx

You can find the EdLUG mailing list FAQ list at:

This archive is kept by wibble@morpheux.org.DONTSPAMME