Lightning flashed, thunder crashed and "Sparkle Williams" <[EMAIL PROTECTED]>
whispered:
| Is there any other way to input information through STDIN other than using
| $variable = <STDIN> ? I have a script that requires multiple values of
| STDIN, each one different, but the script reads each of the consecutive
| STDIN values as equal to the first. Help!
I'm not sure your question makes sense. <> is the input read operator.
You can use other things like getc(), but that just reads character by
character. I don't understand what you mean by "reads each ... as equal to
the first." What does this script do for you:
$first = <STDIN>;
$second = <STDIN>;
$third = <STDIN>;
print "First: $first";
print "Second: $second":
print "Third: $third";
If I feed it "first", "second", and "third", it prints:
First: first
Second: second
Third: third
-spp
--
Stephen P Potter [EMAIL PROTECTED]
"You can't just magically invoke Larry and expect that to prove your point.
Or prove that you have a point." -Simon Cozens
UNIX, Perl, PHP, Web Consulting and Training http://www.unixlabs.net/~spp/
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]