#!/bin/perl

@v = (20, 30, 10);   #Create a list named @v containing 3 integers.

@v = sort {$a <=> $b} @v;   #ascending numeric order
print "@v\n";

@v = sort {$b <=> $a} @v;   #descending numeric order

@v = sort {abs($a - 16) <=> abs($b - 16)} @v;   #how close to 16

exit 0;
