Michael Corgan wrote:
> I used the ARGV earlier, but received errors.  So this is how the
> script looks now:
> #! /usr/local/bin/perl -w
> use strict;
> #
> #
> #
> 
> $/ = "\n%\n";
> 
> while (<>) {
>         my $random = rand(@ARGV);
>         my $question = $ARGV[$random];
>         chomp $question;
>         print $question;
> 
> This is the error I am getting back:
> 
> Use of uninitialized value at /home/mcorgan/bin/flash line 12, <>
> chunk 1. Use of uninitialized value at /home/mcorgan/bin/flash line
> 13, <> chunk 1. Use of uninitialized value at /home/mcorgan/bin/flash
> line 12, <> chunk 2. Use of uninitialized value at
> /home/mcorgan/bin/flash line 13, <> chunk 2. 
> 
> Aren't I initializing the values with the "my" before the scalar
> variables? 
> 
> 
        Micheal,
           Unsure what you are trying to do? You say you are picking from a
file which you are inputting via the command line. Then what?  I see you
picking the the file then print the file. Is that what you want to do? The
while (<>) would read data in from one file after another until all files
are gone.

        Need some other insight on what you are trying.

Wags ;)


**********************************************************
This message contains information that is confidential
and proprietary to FedEx Freight or its affiliates.
It is intended only for the recipient named and for
the express purpose(s) described therein.
Any other use is prohibited.
****************************************************************


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to