Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW

comment on

( #3333=superdoc: print w/replies, xml ) Need Help??
use warnings; use 5.016; use utf8; use open qw/:std :utf8/; use Text::CSV qw/csv/; # also install Text::CSV_XS for speed use Unicode::Collate; my $Collator = Unicode::Collate->new( preprocess => sub { $_[0][0] =~ s/^(?:o|a)\s+//ir } ); my $rows = csv( in=>*DATA, sep=>"|", esc=>"\\", auto_diag=>2 ); my @sorted = $Collator->sort(@$rows); csv( in=>\@sorted,out=>*STDOUT, sep=>"|", esc=>"\\", quote_space=>0 ); __DATA__ a cerveja|beer o ano|year a laranja|orange beber|to drink įgua|water o copo de vinho|glass of wine o copo|glass or cup o sumo|juice


įgua|water o ano|year beber|to drink a cerveja|beer o copo|glass or cup o copo de vinho|glass of wine a laranja|orange o sumo|juice

Update: Realized I could use $Collator->sort instead of $Collator->cmp.

In reply to Re: Perl custom sort for Portuguese Lanaguage by haukex
in thread Perl custom sort for Portuguese Lanaguage by Galdor

Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":

  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or or How to display code and escape characters are good places to start.
Log In?

What's my password?
Create A New User
Domain Nodelet?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (3)
As of 2022-01-28 06:39 GMT
Find Nodes?
    Voting Booth?
    In 2022, my preferred method to securely store passwords is:

    Results (73 votes). Check out past polls.