in reply to Re^4: threads::shared referencing confusion
in thread threads::shared referencing confusion
but I don't think you tried it; on the line you annotate with # 456, you probably mean to say $x, but you put say $X. Tragically, Perl is case-sensitive when it comes to variables.my $x = 123; ( async { $x = 456; say $X; # 456 } )->join(); say $x; # 123
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^6: threads::shared referencing confusion
by ikegami (Patriarch) on Aug 22, 2024 at 14:38 UTC |