I'm trying to compute a value and return it to a scalar. want to do this through an anonymous sub, but I can't figure out the syntax. I basically have something like
$val = sub { return 2 };
I'm creating a reference to the sub, but I would actualy like to get the value 2 in $val.
Must sound simple, but I've never worked with anonymous subdbs before....
AD AUGUSTA PER ANGUSTA
Thierry
$val = sub { return 2 };
I'm creating a reference to the sub, but I would actualy like to get the value 2 in $val.
Must sound simple, but I've never worked with anonymous subdbs before....
AD AUGUSTA PER ANGUSTA
Thierry