Tim Lago wrote:
> 
> I have this perl script that works for what I need to do with it except for
> the menus.  I am new to perl and I have found out that I can download menu
> modules that can do what I want, but I am looking for a simpler solution.
> 
> Ok, the question I have is this, can I create a simple menu that allows for
> the user to select from a pre defined section of choices, 1-5, and how would
> I do this.  What I have done with the first two choices doesn't work, it
> always defaults to the first choice.
> 
> Anyway help would be greatly appreciated it.
> 
> #!/perl/bin

Enabling warnings would have caught your error.

#!/perl/bin -w
use strict;


> [snip code]
> 
> if ($choice = 1){
              ^
You are assigning the value 1 to the variable $choice.

if ( $choice == 1 ) {


>   while(<INFILE>){
>   if(/10.1.1.234/){
>   print OUTFILE;
>   $count++;
>   }
>  }
> }
> 
> elsif ($choice = 2){
                 ^


>   while(<INFILE>){
>   if(/10.1.2.234/) {
>   print OUTFILE;
>   $count++;
>   }
>  }
> }



John
-- 
use Perl;
program
fulfillment

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

Reply via email to