shuffle a array

pengyh <[email protected]> Wed, 17 Aug 2022 09:07:48 +0800
Newsgroups gmane.comp.apache.mod-perl
Message-ID <[email protected]>
in my modperl app I want to shuffle an array. such as this method in ruby,

irb(main):005:0> array
=> [1, 2, 3, 4]
irb(main):006:0> array.shuffle
=> [1, 4, 3, 2]


do you know how to achieve it in perl?

Thanks.