in reply to issues with eval (get a variable's value)

I wrote this but it is only working if the variables are set with "our".

That works with my variables as well. However, those variables have to be in the same scope as your display_init function:

my $i = 42; my $j = 'FreeBSD'; sub display_init { my @variables = @_; my $value; foreach (@variables) { eval("\$value=\$$_"); if (! defined($value) ) { $value = "undefined"; } print "$_ : $value\n"; } } display_init (qw( i j)); __END__ i : 42 j : FreeBSD

--shmem

_($_=" "x(1<<5)."?\n".q·/)Oo.  G°\        /
                              /\_¯/(q    /
----------------------------  \__(m.====·.(_("always off the crowd"))."·
");sub _{s./.($e="'Itrs `mnsgdq Gdbj O`qkdq")=~y/"-y/#-z/;$e.e && print}