Well, that doesn't look comma delimited (or comma separated) to me, but here you go: (see also: Schwartzian Transform):
#!/usr/bin/perl -w use strict; my @lines = <DATA>; my @sorted = map {$_->[0]} sort {$a->[1]<=>$b->[1]} map {[$_,/^(\d+)/]} @lines[2..$#lines]; print @sorted; __DATA__ COUNT Type Error Message ------------------------------ 3 pro bad message #1 99 dis bad message #2 209 pro bad message #3 44 dis bad message #4 19 dis Bad message #5
In reply to Re: Help with parsing through a comma delimted file
by danger
in thread Help with parsing through a comma delimted file
by vonman
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |