Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - Software
User Name
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.


  Search this Thread
Old 02-13-2004, 12:16 PM   #1
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, 12:59 PM   #2
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.

Old 02-13-2004, 03:11 PM   #3
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.


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 04:30 AM
Perl Scripting on Filename lengths supreme_command Programming 2 05-16-2004 03:06 AM
shell scripting and perl irubin Programming 1 01-01-2004 08:27 AM
Perl scripting Rameriez Programming 4 02-03-2003 01:01 AM
More perl scripting fun BertsBackyard Programming 12 01-30-2003 08:54 AM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 02:04 AM.

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