#!/usr/bin/perl

use 5.040;
no strict;
# no warnings;  # Maybe better, but the explanations could be related to internals

my @nums = 1..1000;
my $prefix = 'main::x';

my $c = 0;
${$prefix.$_} = ++$c for (@nums);

say "Primero = $x1";
say "Último = $x1000";

my $n = int (rand()*scalar(@nums));

say "Random = ${$prefix.$n}";

exit 2;

