Could somebody help me how to solve my problem, I have a hash variable that I want to convert into dot file (graphviz).
I know how to convert it to dot file but I need some modification on the output of the hash variable before convert it to dot file.
Eeach key of hash variable (Perl1, Perl2, ....Perl6) will be divided into 2 parts.
Hi All,
I'm trying to test a Hash variable but it's not working. Here is my code - can anyone tell me if the test is valid?
for (keys %enabled_yn) {
if ($enabled_yn{$1} =~ m/\s+Y/) {
$html =~ s/%(\w+)%/\<b\>\<font color\=orange\>$enabled_yn{$1}\<\/font\>\<\/b\>/g;
}... (1 Reply)
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)
Hi Everyone,
Can anyone help me how do i call hash variable in to sql query in perl. Please see the script below
i have defined two Hash %lc and %tab as below
$lc{'REFF'}='V_RES_CLASS';
$lc{'CALE'}='V_CAP_CLASS';
$lc{'XRPD'}='V_XFMR_CLASS';
$tab{'V_RES_CLASS'}='V_MFR_SERS';... (6 Replies)
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)
Hey guys,
Sorry for the basic question but I have a lot of files that I want to separate into groups based on filenames which I can then cat together. Eg I have:
(a_b_c.txt)
WB34_2_SLA8.txt
WB34_1_SLA8.txt
WB34_1_DB10.txt
WB34_2_DB10.txt
WB34_1_SLA8.txt
WB34_2_SLA8.txt
77_1_SLA8.txt... (1 Reply)
Hi,
Is it possible in perl to have a hash defined with variables as theirs key values, like:
%account = ('username' => 'boy', 'password' => $password);
Thanks (1 Reply)
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)
I have a shell script that is currently transferring a csv file from a server into a Teradata database table. One of the 30 or so columns is called "destination_url". In that URL there are parameters, and it is possible for those parameters to be repeated because of referring companies copying... (3 Replies)
I have a very inefficient awk below that I need some help improving. Basically, there are three parts, that ideally, could be combined into one search and one output file. Thank you :).
Part 1:
Check if the user inputted string contains + or - in it and if it does the input is writting to a... (4 Replies)
Discussion started by: cmccabe
4 Replies
LEARN ABOUT DEBIAN
digest::jhash
Digest::JHash(3pm) User Contributed Perl Documentation Digest::JHash(3pm)NAME
Digest::JHash - Perl extension for 32 bit Jenkins Hashing Algorithm
SYNOPSIS
use Digest::JHash qw(jhash);
$digest = jhash($data);
# note that calling jhash() directly like this is the fastest way:
$digest = Digest::JHash::jhash($data);
DESCRIPTION
The "Digest::JHash" module allows you to use the fast JHash hashing algorithm developed by Bob Jenkins from within Perl programs. The
algorithm takes as input a message of arbitrary length and produces as output a 32-bit "message digest" of the input in the form of an
unsigned long integer.
Call it a low calorie version of MD5 if you like.
See http://burtleburtle.net/bob/hash/doobs.html for more information.
FUNCTIONS
jhash($data)
This function will calculate the JHash digest of the "message" in $data and return a 32 bit integer result (an unsigned long in the C)
EXPORTS
None by default but you can have the jhash() function if you ask nicely. See below for reasons not to use Exporter (it is slower than a
direct call)
SPEED NOTE
If speed is a major issue it is roughly twice as fast to do call the jhash() function like Digest::JHash::jhash('message') than it is to
import the jhash() method using Exporter so you can call it as simply jhash('message'). There is a short script that demonstrates the
speed of different calling methods (direct, OO and Imported) in examples/oo_vs_func.pl
AUTHORS
The JHash implementation was written by Bob Jenkins <bob_jenkins [at] burtleburtle [dot] net>.
This perl extension was written by Andrew Towers <mariofrog [at] bigpond [dot] com>.
A few mods were added by James Freeman <airmedical [at] gmail [dot] com>).
SEE ALSO
http://burtleburtle.net/bob/hash/doobs.html
LICENSE
This package is free software and is provided "as is" without express or implied warranty. It may be used, redistributed and/or modified
under the terms of the Artistic License 2.0. A copy is include in this distribution.
perl v5.14.2 2010-07-26 Digest::JHash(3pm)