LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 02-13-2004, 01:16 PM   #1
feetyouwell
Member
 
Registered: Dec 2003
Location: NC, US
Distribution: Novell Linux Eval (2.6.5)
Posts: 240

Rep: Reputation: 30
question about perl scripting


what can i do to get perl to get user input

ex. i am writting a short script call mypgm

i want to user to be able to do: ./mypgm <something>

then the <something> will be passed to my program into a varible.

It's sth. equivenlent to read command in shell script, can anyone help me?
 
Old 02-13-2004, 01:59 PM   #2
LinuxLala
Senior Member
 
Registered: Aug 2003
Location: New Delhi, India
Distribution: Fedora 7
Posts: 1,305

Rep: Reputation: 45
Why don't you report your post to the moderator, by clicking on the button at the bottom right of your post, and ask him to move it to the Programming forum. You will get a reliable solution fast I am sure.

Cheers.
 
Old 02-13-2004, 04:11 PM   #3
Hangdog42
LQ Veteran
 
Registered: Feb 2003
Location: Maryland
Distribution: Slackware
Posts: 7,803
Blog Entries: 1

Rep: Reputation: 416Reputation: 416Reputation: 416Reputation: 416Reputation: 416
Everything typed on the command line ends up in the @ARGV variable and you can access it from your program the same way you would any other list.
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
Perl or bash scripting? philipina Linux - General 1 07-26-2004 05:30 AM
Perl Scripting on Filename lengths supreme_command Programming 2 05-16-2004 04:06 AM
shell scripting and perl irubin Programming 1 01-01-2004 09:27 AM
Perl scripting Rameriez Programming 4 02-03-2003 02:01 AM
More perl scripting fun BertsBackyard Programming 12 01-30-2003 09:54 AM


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

Main Menu
Advertisement
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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration