in reply to Re: Resolving scalars in a scalar
in thread Resolving scalars in a scalar
I realize your regex wasn't meant to be used in a real example, but do realize that Perl will allow far more than \w chars in a variable. You can even get whitespace in there with symbolic refs:
$ perl -MData::Dumper -e '$field = "foo bar"; *$field = 1; print Data: +:Dumper::Dumper(\%main::)' $VAR1 = { # Cut other variables in output 'foo bar' => *{'::1'}, };
Of course, you could only access such a beast with another symbolic ref.
----
I wanted to explore how Perl's closures can be manipulated, and ended up creating an object system by accident.
-- Schemer
: () { :|:& };:
Note: All code is untested, unless otherwise stated
|
|---|