develooper Front page | perl.beginners | Postings from February 2002

Arrays 1x3 or 3x1 - The real questions

Thread Next
Steven M. Klass
February 12, 2002 08:50
Arrays 1x3 or 3x1 - The real questions
Message ID:
Hi all,

Let's start off with some simple code..

my $arg = &SomeFunction ( my @arry = qw/one two three/)

sub SomeFunction {
	my @array = @_[0];
	for (my $i =0; i < @array; i ++ ) {
		print "$array[0][$i]

Ok now I understand what the problem is, but I don't know how to fix it.  I 
only have a 1 x 3 array so only "one" gets printed - instead of the desired 
"one two three"..

How do I fix this?  This seems simple enough..  

Also if you want to suggest an alternate path, by all means.:)

Thanks a lot!


 Steven M. Klass
 Physical Design Manager

 National Semiconductor Corp
 7400 W. Detroit Street
 Suite 170
 Chandler AZ 85226


Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About