Jim Hansen wrote:

> Can this be made dynamic or is it strictly static as
> far as number of rows and contents:
> 
> For example, this doesn't work, but can it in some
> way?
> 
> my $status <<EOD
> 
> $a=0;
> 
> foreach $server (@Servers){
> 
>    $a++;
> 
>    server $server[$a]\n
> 
> }
> 
> EOD

Not sure what you're trying to do, but you could do something like this :

use strict;
use warnings;

my @Servers = qw(1 2 3 4 5);

my $status = <<'EOD';

my $a = 0;
foreach my $server (@Servers) {
   $a++;
   print "server=$server\n";
}
print "a=$a\n";

EOD

print "status=$status\n";
eval $status;

__END__


-- 
  ,-/-  __      _  _         $Bill Luebkert    Mailto:[EMAIL PROTECTED]
 (_/   /  )    // //       DBE Collectibles    Mailto:[EMAIL PROTECTED]
  / ) /--<  o // //      Castle of Medieval Myth & Magic http://www.todbe.com/
-/-' /___/_<_</_</_    http://dbecoll.tripod.com/ (My Perl/Lakers stuff)
_______________________________________________
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to