perl project command line arg?

Reply

Join Date: Dec 2008
Posts: 14
Reputation: inked is an unknown quantity at this point 
Solved Threads: 0
inked inked is offline Offline
Newbie Poster

perl project command line arg?

 
0
  #1
Dec 14th, 2008
hi ive got this assignment to do, ive got to write a perl program that analyses a text file to obtain statistics. Need some help with this particular section

when run the program should check if an argument has been provided if not the program should prompt for and accept input of a file name from the keyboard

i assume this has something to do with command line arguments however im finding it hard to find any sort of reference, the materials i have arent all that brilliant on how to properly code this for starters not even sure im looking in the right place
Reply With Quote Quick reply to this message  
Join Date: Dec 2005
Posts: 5,850
Reputation: Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute 
Solved Threads: 749
Team Colleague
Salem's Avatar
Salem Salem is offline Offline
Void main'ers are DOOMed

Re: perl project command line arg?

 
0
  #2
Dec 14th, 2008
http://www.perl.org/ and a Camel Book

First thing you need to search for is all about the array @ARGV
Reply With Quote Quick reply to this message  
Join Date: Feb 2009
Posts: 57
Reputation: mitchems is an unknown quantity at this point 
Solved Threads: 2
mitchems's Avatar
mitchems mitchems is offline Offline
Junior Poster in Training

Re: perl project command line arg?

 
0
  #3
Feb 5th, 2009
Personally if these arguments are operators or switches I like to use Get::Opts which converts the operators to $opt_[letter] and can get switches as well as values.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Other Threads in the Perl Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC