I am taking the output from a file in tabular form.
This is how the file.txt will look like. suppose its a 4*4 matrix
1 2 3 4
a b c d
e f g h
i j k l
Now i want to fetch a particular element of the table say 2nd row and 3rd column. I am using the below code but i am not getting the ouput.
I am storing the table in a array and taking the ref of it.
open(FH, "file.txt);
@Table = <FH>;
close FH;
$ref = \@Table;
print "${$ref[2][3]}";
The ouput should be “c”
Please tell me why ouput is not coming
Here is a code that works as you want:
output: