On Tuesday 04 October 2005 07:48, Jabir Ahmed wrote: [..] > my @details=split('\t',$line); > [EMAIL PROTECTED]; > $reccnt+=1; [..] > > How do i read the values of @details trought the > $record array; > i want something like this > print $record[1][1] ==> this would refer to the first > element in the @details. (this doesnt work)
Hi Jabir, you can access the contents of an array reference (which is what you got inside @record - references to arrays) using the "->" operator, e.g. my $first_detail = $record[0] -> [1]; This is actually a shortcut to the somewhat more explicit version of # grab the first reference and convert it back into an array my @details = @{$record[0]}; my $first_detail = $details[0]; HTH, Philipp -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>