The UNIX and Linux Forums  

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 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 05:39 PM
Perl code to differentiate numeric and non-numeric input Raynon Shell Programming and Scripting 11 08-04-2007 07:32 AM
How to prompt for input & accept input in ONE line newbie168 Shell Programming and Scripting 2 09-27-2005 02:02 AM
perl question - removing line from input file reggiej Shell Programming and Scripting 3 06-07-2005 10:45 AM
Perl: Variable input via HTML douknownam Shell Programming and Scripting 5 02-13-2005 07:39 PM

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 12-04-2001
emcb
Guest
 

Posts: n/a
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
Reply With Quote
Forum Sponsor
  #2 (permalink)  
Old 12-05-2001
PxT's Avatar
PxT PxT is offline
Registered User
 

Join Date: Oct 2000
Location: Sacramento, CA
Posts: 905
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?
Reply With Quote
  #3 (permalink)  
Old 12-06-2001
emcb
Guest
 

Posts: n/a
Thats What I Need!

I need to get to lines of input username/password and then run them against a login program.
Reply With Quote
Google UNIX.COM
Reply

Thread Tools
Display Modes




All times are GMT -7. The time now is 12:06 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008 The CEP Blog All Rights Reserved -Ad Management by RedTyger Visit The Global Fact Book

Content Relevant URLs by vBSEO 3.2.0