[EMAIL PROTECTED] wrote:
Hi All
Hello,
Prob: I want to convert all the elememts of an array to ascalor variable that I can use latter on in my code
Each element of an array *is* a scalar so why do you think you need to do this?
e.g.
my @array=qw/balli johney bobby/;
now here i need 3 different variable with the above values i.e.
my $name1=balli ;
my $name2=johney ;
my $name3=bobby ;
Soln so far:
my ($i) ;
for ($i=0; $i<@array;$i++)
{
$name=$array[$i] ; # lost here is to how to have different $name each time also how can make these $names available out side the block as iam using strict. I am sure there is acleaver way of doing this. need help!!!!!
}
my ( $name1, $name2, $name3 ) = @array;
John
--
use Perl;
program
fulfillment
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>