What happen with my code?
use strict;
use warnings;
use diagnostics;
my @words = ("this","that");
# With this code
$words[5] = "bad idea";
for my $element (@words){
print "$element\n";
}
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
"words.pl" 13L, 167B 1,1
Hello
Try with this code:
use strict;
use warnings;
use Data::Dumper;
my @words = ("this","that");
# With this code
$words[5] = "bad idea";
print Dumper \@words;
And it outputs:
$VAR1 = [
'this',
'that',
undef,
undef,
undef,
'bad
I have any ideas
1. phone guide
--
With kindest regards, William.
⢀⣴⠾⠻⢶⣦⠀
⣾⠁⢠⠒⠀⣿⡁ Debian - The universal operating system
⢿⡄⠘⠷⠚⠋⠀ https://www.debian.org
⠈⠳⣄