in reply to Sorting issues
If You insist on "sort" here is my way to do it:
for the database as
for the database as
the code1 2 3 |10 a b c |20 e f g |100 x n f |1
does exactly:#!/usr/bin/perl -w use strict; my %H; open(R,"database"); map {/\|(\d+)/; $H{$1}=$_ if $1}<R>; close(R); foreach (sort {$a<=>$b} keys %H){print $H{$_}}
Enjoy...x n f |1 1 2 3 |10 a b c |20 e f g |100
|
---|
In Section
Seekers of Perl Wisdom