in reply to Prototype like sort()?
#!/usr/bin/perl use warnings; use strict; sub mysort (@) { my @array = @_; return sort @array; } my @abc = mysort 4,2,1,3; print "@abc"; #prints 1 2 3 4
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Prototype like sort()?
by perlancar (Hermit) on Jan 25, 2018 at 10:03 UTC | |
by Marshall (Canon) on Jan 25, 2018 at 10:57 UTC | |
by RonW (Parson) on Jan 27, 2018 at 00:33 UTC | |
by Laurent_R (Canon) on Jan 28, 2018 at 00:09 UTC | |
|
Re^2: Prototype like sort()?
by karlgoethebier (Abbot) on Jan 27, 2018 at 17:54 UTC |