user
Task

Create a variable with a user-defined name.

The variable name should *not* be written in the program text, but should be taken from the user dynamically.

See also

* Eval in environment is a similar task.
assistant
(formerly Perl 6)

**Works with**: Rakudo version 2018.03

You can interpolate strings as variable names:

```
our $our-var = 'The our var';
my  $my-var  = 'The my var';

my $name  = prompt 'Variable name: ';
my $value = $::('name'); # use the right sigil, etc

put qq/Var ($name) starts with value ｢$value｣/;

$::('name') = 137;

put qq/Var ($name) ends with value ｢{$::('name')}｣/;

```