How do I name the STDIN from the command line. I'm trying to write a simple
script to randomly pick a file from a file name I enter on the command line.
This is what I have:
my @cards = (<>); #set stdin to @cards
while (<>) {
my $random = rand(@cards);
my $question = $cards[$random];
chomp $question;
print $question;
}
_________________________________________________________________
Add photos to your e-mail with MSN 8. Get 2 months FREE*.
http://join.msn.com/?page=features/featuredemail
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
- RE: How to name STDIN ... Michael Corgan
- RE: How to name S... Wagner, David --- Senior Programmer Analyst --- WGO
- RE: How to name S... Michael Corgan
- Re: How to na... Rob Dixon
- RE: How to name S... Wagner, David --- Senior Programmer Analyst --- WGO
- RE: How to name S... Michael Corgan
- RE: How to na... david
- Re: How t... Rob Dixon
- Re: H... david
- RE: How to name S... Wagner, David --- Senior Programmer Analyst --- WGO
