Perhaps your code would look better with exists rather than defined.
#!/usr/bin/perl -w use strict; my @test = ( 0 ); my $len = 0; if ( exists $test[1]->[1] ) { $len = @test; } print $len;
In reply to Re: defined of a matrix
by rnahi
in thread defined of a matrix
by PerlingTheUK
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |