The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
[Perl] Silent Input eightysix Shell Programming and Scripting 2 11-20-2007 09:39 PM
Perl code to differentiate numeric and non-numeric input Raynon Shell Programming and Scripting 11 08-04-2007 10:32 AM
How to prompt for input & accept input in ONE line newbie168 Shell Programming and Scripting 2 09-27-2005 05:02 AM
perl question - removing line from input file reggiej Shell Programming and Scripting 3 06-07-2005 01:45 PM
Perl: Variable input via HTML douknownam Shell Programming and Scripting 5 02-13-2005 11:39 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 12-04-2001
emcb
Guest
  
 

Posts: n/a
Bits: 0 [Banking]
getting input from perl

Hi,

i have just tried something in perl

#!/path/to/perl
print "login: ";
$login = <STDIN>;

print "\npassword: ";
$password = <STDIN>;

print "Username=$login\n";
print "Password=$password\n";

And it doesnt work, anyone know how i can get more than one line?

Cheers,

Elfyn
  #2 (permalink)  
Old 12-05-2001
PxT's Avatar
PxT PxT is offline Forum Advisor  
Registered User
  
 

Join Date: Oct 2000
Location: Sacramento, CA
Posts: 909
Why do you need to get more than one line?

$login = &lt;STDIN&gt;;
$password = &lt;STDIN&gt;;

should each read one line from the keyboard. Is that what you are tying to do?
  #3 (permalink)  
Old 12-06-2001
emcb
Guest
  
 

Posts: n/a
Bits: 0 [Banking]
Thats What I Need!

I need to get to lines of input username/password and then run them against a login program.
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 09:55 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0