Ryan Moszynski wrote:
> Is there a way to make my commented 'foreach" line act the same as the
> line above it?
> 
> Can I pass a list as a variable as I am trying to do, or doesn't perl
> support that?
> 
> ###########
> #!/usr/bin/perl -w
> $|=1;
> #use strict;
> 
> system "clear";
> my @array = 1024;
> my $list4 = "0..10,33..43,100..111";
> 
>     foreach (0..10,33..43,100..111){
>     #foreach ($list4){
> 
>     $array[$_] = $_;
> 
>     print "array--$array[$_]-- --$_--\n";
> 
> }
> ###########

        What are you trying to do? Are you trying to set the array indexes at 0 
1 2 to 0 1 2 etc? The my @array = 1024 is not accomplishing what I belive you 
are after.

Wags ;)
WGO: x2224

**********************************************************************
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]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to