D
doolittle
Hi,
The 4th line of the following code fragment is a syntax error.
my @size = getvalue('SZ');
print $size[0]."\n"; #OK
print @{$sgf->SZ}[0]."\n"; #OK
print getvalue('SZ')[0]."\n"; #sysntax error
sub getvalue {
my $propertyname = shift;
return @{$sgf->$propertyname}
}
Can i re-phrase the 4th line in some clever way, or am i stuck with the
methods on lines 1 or 2?
Dan
The 4th line of the following code fragment is a syntax error.
my @size = getvalue('SZ');
print $size[0]."\n"; #OK
print @{$sgf->SZ}[0]."\n"; #OK
print getvalue('SZ')[0]."\n"; #sysntax error
sub getvalue {
my $propertyname = shift;
return @{$sgf->$propertyname}
}
Can i re-phrase the 4th line in some clever way, or am i stuck with the
methods on lines 1 or 2?
Dan