fishy has asked for the wisdom of the Perl Monks concerning the following question:
Running it with "perl -d:DProf" I get the following error message: "Modification of a read-only value attempted at - line 4." Commenting out the offending line, no error but no shuffled list. With just "perl -w" everything is fine. I get a shuffled list without error.use strict; use List::Util qw(shuffle); my @train = (1, 2, 3, 4, 1, 2, 4, 4, 1, 2, 3, 4, 1); my @test = shuffle @train; # my @test = @train;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Profiling with List::Util qw(shuffle)
by andreas1234567 (Vicar) on Jun 10, 2008 at 11:06 UTC | |
|
Re: Profiling with List::Util qw(shuffle)
by cdarke (Prior) on Jun 10, 2008 at 12:26 UTC | |
|
Re: Profiling with List::Util qw(shuffle)
by moritz (Cardinal) on Jun 10, 2008 at 11:00 UTC | |
|
Re^2: Profiling with List::Util qw(shuffle)
by tinita (Parson) on Jun 10, 2008 at 11:49 UTC | |
|
Re: Profiling with List::Util qw(shuffle)
by syphilis (Archbishop) on Jun 10, 2008 at 12:11 UTC | |
|
Re: Profiling with List::Util qw(shuffle)
by linuxer (Curate) on Jun 10, 2008 at 12:10 UTC | |
|
Re: Profiling with List::Util qw(shuffle)
by cdarke (Prior) on Jun 10, 2008 at 12:17 UTC | |
|
Re: Profiling with List::Util qw(shuffle)
by magnifico18 (Initiate) on Jun 10, 2008 at 18:54 UTC |