LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
LinkBack Search this Thread
Old 12-30-2004, 08:05 AM   #1
djgerbavore
Member
 
Registered: Jun 2004
Location: PA
Distribution: Fedora (latest git kernel)
Posts: 442

Rep: Reputation: 30
command arguments in perl


after looking and thinking i still haven't came up with a good solution. I want to be able to process my swtiches (aka -c -CD c) in my perl script in a clear, logical way.

for example
Code:
perl myScript -c or perl myScript -ca or perl myScript -c -a
I was wonder if perl has a crazy way of processing switches..


thanks
djgerbavore
 
Old 12-30-2004, 08:06 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,345

Rep: Reputation: 1945Reputation: 1945Reputation: 1945Reputation: 1945Reputation: 1945Reputation: 1945Reputation: 1945Reputation: 1945Reputation: 1945Reputation: 1945Reputation: 1945
no, it's really easy... just use getopts
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem with passing arguments in Perl bahadur Programming 1 05-30-2005 01:47 AM
perl arguments zaken Programming 1 02-27-2005 11:19 AM
see what arguments are available for a command naijaguy Linux - Newbie 3 08-12-2004 10:05 PM
Help with command line arguments ? synapse Linux - Newbie 2 02-23-2004 02:25 AM
Perl: Getting a script to accept arguments JStew Programming 10 03-10-2003 06:56 AM


All times are GMT -5. The time now is 01:01 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration