#!/usr/bin/perl -w #strip whitespace chomp (@a = ); # sort numerically @sorted = sort { $a <=> $b } @a; # add commas $test = join(', ', @sorted); #print it print "$test\n" ;