sub order_line{ my @sorted_lines = sort _by_left @lines; print @sorted_lines; } sub _by_left { return lc( _on_left( $a )) cmp lc( _on_left( $b )); }