Hi group,
I am trying to process a hash (words as keys and frequency counts in an
array as values). Instead of just sorting it by values, I want to sort
it by the probabilities and I tried this...
foreach $rule (sort {\&compute_probability($b) <=>
\&compute_probability($a)} keys %rules_new) {
You can try this.
$test->{$setup}->{'data'} = [$data[0], $data[1]];
As you said reference is not going to work, if your array value changes at run
time. You can also access specific elements of the array individually, whenever
required.
Baskaran
From: Mich
>>
-Original Message-
From: Mr. Shawn H. Corey [mailto:[EMAIL PROTECTED]
Sent: 20 March 2006 16:25
To: beginners@perl.org
Subject: Re: Tree:Nary and Unicode
Baskaran Sankaran wrote:
> use Tree::Nary;
>
> use warnings;
>
>
>
> open(O, ">chil
Hi group,
My Unicode blues continues… One more question on handling Unicode.
Does Tree::Nary module works with Unicode data? I am trying to store some
Unicode strings (UTF-8 to be precise) as Nary Tree.
When I retrieve the value of the nodes from the tree, it produces the output as
bo
Hi Group,
Am working with Unicode (UTF8 coded) stuff and facing problem with regular
expression.
s/(\p{HinNumerals})\s+($tokenize_string)+\s+(\p{HinNumerals})/$1$2$3/g;
and, my HinNumerals is defined as,
sub HinNumerals {
return <
:56
To: Baskaran Sankaran
Cc: beginners@perl.org
Subject: Re: FW: Reading a Unicode text file
On 2/17/06, Baskaran Sankaran <[EMAIL PROTECTED]> wrote:
> File: Sample_Hin.txt
>
> दूसरे राज्य पुनर्गठन आयोग के गठन का यही सही वक्त है।
> The sample files were created in
Hi group,
Opening a file for output is fine. I've also moved the binmode immediately
after open, outside the loop. But, the error still shows. Now, here are the
sample files and my command would be:
> perl number_sent.pl Sample_Eng.txt Sample_Hin.txt Sample_out.txt
File: Sample_Eng.tx
Hi group,
Is there a source for practical Unicode handling in Perl with example
programs (sort of cook book will be useful)?
Man pages like perlunicode, perluniintro are fine but I feel they are
far less than practical. Any pointers would be great.
Thanks,
Baskaran
rom: JupiterHost.Net [mailto:[EMAIL PROTECTED]
Sent: 09 February 2006 21:04
To: beginners@perl.org
Subject: Re: Reading a Unicode text file
Baskaran Sankaran wrote:
> Thanks for that but still I do face problem. I did that and it raises
a
> warning:
>
>
>
> utf8 "\xFF"
Hi,
I am trying to read a Unicode text file and the code fragment is as
below:
$infile = "sample_hindi.txt";
$outfile = "out.txt";
open(F, "<:utf8", $infile);
while() {
chomp;
binmode ( STDOUT, ":utf8" );
print "$_";
}
close(F);
The output correctly displays
10 matches
Mail list logo