Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ARGV separator

Status
Not open for further replies.

CJason

Programmer
Joined
Oct 13, 2004
Messages
223
Location
US
Is it possible to make ARGV recognize "," as a valid separator...as well as " " (<blank>).

Thanks!
 
Do you mean that when you type "perl test.pl foo,bar", @ARGV contains two elements: "foo" and "bar"?

No. You'd have to split the elements of @ARGV on a comma yourself if you wanted that behaviour.
 
If you want to have some fancy options you might look into Getopt module. It might be able to help you out.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top