10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
I have an hashes of hash, where hash is dynamic, it can be n number of hash. i need to compare data_count values of all .
my %result (
$abc => {
'data_count' => '10',
'ID' => 'ABC122',
}
$def => {
'data_count' => '20',
'ID' => 'defASe',
... (1 Reply)
Discussion started by: asak
1 Replies
2. Shell Programming and Scripting
I want to sort values of a hash in ascending order.
my %records;
for my $value (sort values %records){print $value,"\n";}
When I use the above code I get values in this order: 1,10,11,2,3,4,5,6,7,8,9. But, I need values in my output in this order: 1,2,3,4,5,6,7,8,9,10,11.
Can Someone... (1 Reply)
Discussion started by: koneru_18
1 Replies
3. Shell Programming and Scripting
Hi Folks
I am very much a newbie at perl but picking it up and I'm hoping you can help.
I have a file input that details all the /etc/group files in our enterprise in the following format: "<host>:<group>:<gid>:<users>"
I want to parse this data display it as the following:... (9 Replies)
Discussion started by: g_string
9 Replies
4. Programming
Hi,
I have the xml file file this, perl script to create hash<p>
<university>
<name>svu</name>
<location>ravru</location>
<branch>
<electronics>
<student name="xxx" number="12">
<semester number="1"subjects="7" rank="2"/>
</student>
<student name="xxx"... (1 Reply)
Discussion started by: veerubiji
1 Replies
5. Shell Programming and Scripting
hi all,
i have a small problem regarding sorting the keys in a hash.
my %hash;
for($i=0;$i<19;$i++)
{
$hash{$i}=$i;
}
foreach $c (sort keys %hash)
{
print "\n $hash{$c}";
} (1 Reply)
Discussion started by: niteesh_!7
1 Replies
6. Shell Programming and Scripting
Can Someone explain me why even using Tie::IxHash I can not get the output data in the same order that it was inserted? See code below.
#!/usr/bin/perl
use warnings;
use Tie::IxHash;
use strict;
tie (my %programs, "Tie::IxHash");
while (my $line = <DATA>) {
chomp $line;
my(... (1 Reply)
Discussion started by: jgfcoimbra
1 Replies
7. Shell Programming and Scripting
Hello,
I have parsed an xml file using perl to get the hash values and the output looks like this
$VAR1 = {
'RT' => {
'List' => {
'String' => ... (1 Reply)
Discussion started by: userscript
1 Replies
8. Shell Programming and Scripting
I am trying to read in a 2 column data file into Perl Hash array index. Here is my code.
#!/usr/bin/perl -w
use strict;
use warnings;
my $file = "file_a";
my @line = ();
my $index = 0;
my %ind_file = ();
open(FILE, $file) or die($!);
while(<FILE>) {
chomp($_);
if ($_ eq '')
{
... (1 Reply)
Discussion started by: subhap
1 Replies
9. Shell Programming and Scripting
I have a script (say script1.sh ) and I am calling a script (say script2.sh) within the script1.sh. Here in script1.sh I have a hash ( say %hash1) and i have to pass this hash to script2.sh. Basically i have to do some processing in Scirpt2.sh based on the hash(key,values). I wanted to know how can... (2 Replies)
Discussion started by: ammu
2 Replies
10. Shell Programming and Scripting
Hello,
I have a page where multiple fields and their values are displayed. But I am able to sort only a few fields. When I looked into the issue, it is seen that the for each row of info , an unique id is generated and id.txt is generated and saved. Only those fields which are inside that id.txt... (3 Replies)
Discussion started by: eagercyber
3 Replies
YAZ_SORT(3) 1 YAZ_SORT(3)
yaz_sort - Sets sorting criteria
SYNOPSIS
void yaz_sort (resource $id, string $criteria)
DESCRIPTION
This function sets sorting criteria and enables Z39.50 Sort.
Call this function beforeyaz_search(3). Using this function alone does not have any effect. When used in conjunction with yaz_search(3), a
Z39.50 Sort will be sent after a search response has been received and before any records are retrieved with Z39.50 Present
(yaz_present(3).
PARAMETERS
o $id
- The connection resource returned by yaz_connect(3).
o $criteria
- A string that takes the form field1 flags1 field2 flags2 where field1 specifies the primary attributes for sort, field2 seconds,
etc.. The field specifies either a numerical attribute combinations consisting of type=value pairs separated by comma (e.g.
1=4,2=1) ; or the field may specify a plain string criteria (e.g. title. The flags is a sequence of the following characters
which may not be separated by any white space.
Sort Flags
o a - Sort ascending
o d - Sort descending
o i - Case insensitive sorting
o s - Case sensitive sorting
RETURN VALUES
No value is returned.
EXAMPLES
Example #1
Sort Criterias
To sort on Bib1 attribute title, case insensitive, and ascending you would use the following sort criteria:
1=4 ia
If the secondary sorting criteria should be author, case sensitive and ascending you would use:
1=4 ia 1=1003 sa
PHP Documentation Group YAZ_SORT(3)