http://qs321.pair.com?node_id=204309


in reply to Sorting @lines

This sounds like a job for a Schwartzian Transform! I'm too tired to give you any example code at the moment... Sorry!
Update: What a sip of beer can do! Here you go:
use strict; use Data::Dumper; my @data = qw( 124.43.adsf.ca 235.23.aer.ca 100.34.asdm.ca ); my @sorted = map { $_->[ 0 ] } sort { $a->[1] cmp $b->[1] } map { [$_, /(\d+\.\d)/] } @data;

Greets,

-- JaWi

"A chicken is an egg's way of producing more eggs."