Sponsored Content
Full Discussion: perl using hash
Top Forums Shell Programming and Scripting perl using hash Post 302319361 by mingming88 on Monday 25th of May 2009 05:46:51 AM
Old 05-25-2009
perl using hash

i want to ask is it i can use hash in perl to store a page number with a list of words which is in that page and then print it out?

Example
Page 1 contains a are boy cat ............. (a list of sorted words)

how can i store it in a hash?
Thank you
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Hash in perl

Hi Help me with some good links of Hash with in Hash .(Multidimensional hash).. Regards Harikrishna (1 Reply)
Discussion started by: Harikrishna
1 Replies

2. Shell Programming and Scripting

Perl Hash

HI I have a hash like this $hashname->{$filesystem}->{'fsname'}=$filesystem; How to get the values from this multilevel hash. Thanks in advance... :) (1 Reply)
Discussion started by: Harikrishna
1 Replies

3. Shell Programming and Scripting

Perl Hash

hi i have two hash achi %disk1,%disk2 with( key, value) (key1,value1) How to store it in another hash.. Plz replyyy. Regards Hari (1 Reply)
Discussion started by: Harikrishna
1 Replies

4. Shell Programming and Scripting

perl hash

i have an hash table in which each value is an array. How can i print for each key the array values??? something like this: thanks (2 Replies)
Discussion started by: littleboyblu
2 Replies

5. Shell Programming and Scripting

perl hash

Hi i am reading one file and creating Hash from the contents of it my issue is there are 3 different files in 3 different locations having same structure so for parsing these files i have one subroutine which returns hash after reading all the 3 files i need to create consolidated hash from three... (2 Replies)
Discussion started by: zedex
2 Replies

6. Shell Programming and Scripting

Perl Hash:Can not keep hash data in the same order that it was inserted

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

perl hash - using a range as a hash key.

Hi, In Perl, is it possible to use a range of numbers with '..' as a key in a hash? Something in like: %hash = ( '768..1536' => '1G', '1537..2560' => '2G' ); That is, the range operation is evaluated, and all members of the range are... (3 Replies)
Discussion started by: dsw
3 Replies

8. Shell Programming and Scripting

Perl hash help

Hi , i have the below code its working fine when i execute in unix , but its not working in windows could you pls explain me where i am going wrong. This is the program $data = { '1' => 'one' , '2' => 'two' , 3 => 'three' }; print "hello : $data->{'1'}... (2 Replies)
Discussion started by: ragilla
2 Replies

9. Shell Programming and Scripting

Compare values of hashes of hash for n number of hash in perl without sorting.

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

10. Programming

Perl: restrict perl from automaticaly creating a hash branches on check

My issue is that the perl script (as I have done it so far) created empty branches when I try to check some branches on existence. I am using multydimentional hashes: found it as the best way for information that I need to handle. Saing multidimentional I means hash of hashes ... So, I have ... (2 Replies)
Discussion started by: alex_5161
2 Replies
hash(1) 						      General Commands Manual							   hash(1)

NAME
hash - Remembers or reports utility locations SYNOPSIS
hash [utility] hash -r STANDARDS
Interfaces documented on this reference page conform to industry standards as follows: hash: XCU5.0 Refer to the standards(5) reference page for more information about industry standards and associated tags. OPTIONS
Forgets all previously remembered utility locations. OPERANDS
The name of a utility to be searched for and added to the list of remembered locations. If utility contains one or more slashes, the results are unspecified. DESCRIPTION
The hash utility affects the way the current shell environment remembers the locations of utilities found. Depending on the arguments spec- ified, it adds utility locations to its list of remembered locations or it purges the contents of the list. When no arguments are specified, hash reports on the contents of the list. This list consists of those utilities named in previous hash invocations that have been invoked, and those invoked and found through the normal command search process. This list includes the path name of each utility in the list of remembered locations for the current shell environment. NOTES
The use of hash with utility names is unnecessary for most applications, but may provide a performance improvement. The effects of hash -r can also be achieved by resetting the value of PATH. RESTRICTIONS
If hash is called in a separate utility execution environment, such as one of the following it will not affect the command search process of the caller's environment. nohup hash -r find . -type f | xargs hash Utilities provided as built-ins to the shell are not reported by hash. EXIT STATUS
The following exit values are returned: Successful completion. An error occurred. ENVIRONMENT VARIABLES
The following environment variables affect the execution of hash: Provides a default value for the internationalization variables that are unset or null. If LANG is unset or null, the corresponding value from the default locale is used. If any of the internationalization vari- ables contains an invalid setting, the utility behaves as if none of the variables had been defined. If set to a non-empty string value, overrides the values of all the other internationalization variables. Determines the locale for the interpretation of sequences of bytes of text data as characters (for example, single-byte as opposed to multibyte characters in arguments). Determines the locale that should be used to affect the format and contents of diagnostic messages written to standard error. Determines the location of message catalogues for the processing of LC_MESSAGES. Determines the location of name. SEE ALSO
Commands: command(1), type(1) Standards: standards(5) hash(1)
All times are GMT -4. The time now is 09:30 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy