- or download this
sub _on_left {
my ( $s ) = @_;
...
my $word_level=3;
return $words[ scalar( @words ) - $word_level ];
}
- or download this
sub _on_left {
my ( $s ) = @_;
...
my $word_level = 3;
return $words[ $word_level - 1 ];
}
- or download this
sub order_line{
my @sorted_lines;
...
return lc( _on_left( $a )) cmp lc( _on_left( $b ));
}
- or download this
sub order_line{
my @sorted_lines = sort { _by_left( $a, $b ) } @lines;
print @sorted_lines;
}
- or download this
sub order_line{
my @sorted_lines = sort _by_left @lines;
...
return lc( _on_left( $a )) cmp lc( _on_left( $b ));
}