Hi :) I'm a unix beginner and i've recently got an assignment to write up a script to print the most common IP address that made requests from a webserver.
I'm really lost in this one...and if someone could pls tell me where to start i'll be really greatful !
thanx (1 Reply)
Hey guys,
I have this file generated by me... i want to create some HTML output from it.
The problem is that i am really confused about how do I go about reading the file.
The file is in the following format:
TID1 Name1 ATime=xx AResult=yyy AExpected=yyy BTime=xx BResult=yyy... (8 Replies)
Hi all,
Is there a way to convert full data matrix to linearised left data matrix?
e.g full data matrix
Bh1 Bh2 Bh3 Bh4 Bh5 Bh6 Bh7
Bh1 0 0.241058 0.236129 0.244397 0.237479 0.240767 0.245245
Bh2 0.241058 0 0.240594 0.241931 0.241975 ... (8 Replies)
Hi everyone
I am very new at awk but think that that might be the best strategy for this. I have a matrix very similar to a correlation matrix and in practical terms I need to convert it into a list containing the values from the matrix (one value per line) with the first field of the line (row... (5 Replies)
Hi all,
I'm trying to get the item with the maximum value, and was wondering if someone can help me with it.
Heres my input file:
apples 15
books 15
books 17
pens 12
pens 15
umbrella 13Here's what my output file should look like:
apples 15
books 17
pens 15
umbrella 13
Can... (2 Replies)
Hello every body ! I'm a new in this forum and beginner in Perl scripting and I have some problems :(:(:(! I have a big file like that :
ID1 ID2 Identity
chromosome07_194379 chromosome01_168057 0.975
chromosome01_100293 chromosome01_168057 ... (23 Replies)
Hi All,
Can someone help steer me to the simplest approach to write a script that reads the second column of a csv file and returns the highest value.
example file:
DATE,QUANTITY
Mon Apr 30 01:56:00 2012,42
Mon Apr 30 02:24:00 2012,72
Mon Apr 30 02:56:00 2012,102
Mon Apr 30 02:59:00... (3 Replies)
I do have a large matrix of the following format and it is tab delimited
ch-ab1-20 ch-bb2-23 ch-ab1-34 ch-ab1-24 er-cc1-45 bv-cc1-78
ch-ab1-20 0 2 3 4 5 6
ch-bb2-23 3 0 5 ... (6 Replies)
Discussion started by: Kanja
6 Replies
LEARN ABOUT DEBIAN
tie::refhash
Tie::RefHash(3perl) Perl Programmers Reference Guide Tie::RefHash(3perl)NAME
Tie::RefHash - use references as hash keys
SYNOPSIS
require 5.004;
use Tie::RefHash;
tie HASHVARIABLE, 'Tie::RefHash', LIST;
tie HASHVARIABLE, 'Tie::RefHash::Nestable', LIST;
untie HASHVARIABLE;
DESCRIPTION
This module provides the ability to use references as hash keys if you first "tie" the hash variable to this module. Normally, only the
keys of the tied hash itself are preserved as references; to use references as keys in hashes-of-hashes, use Tie::RefHash::Nestable,
included as part of Tie::RefHash.
It is implemented using the standard perl TIEHASH interface. Please see the "tie" entry in perlfunc(1) and perltie(1) for more
information.
The Nestable version works by looking for hash references being stored and converting them to tied hashes so that they too can have
references as keys. This will happen without warning whenever you store a reference to one of your own hashes in the tied hash.
EXAMPLE
use Tie::RefHash;
tie %h, 'Tie::RefHash';
$a = [];
$b = {};
$c = *main;
$d = "gunk";
$e = sub { 'foo' };
%h = ($a => 1, $b => 2, $c => 3, $d => 4, $e => 5);
$a->[0] = 'foo';
$b->{foo} = 'bar';
for (keys %h) {
print ref($_), "
";
}
tie %h, 'Tie::RefHash::Nestable';
$h{$a}->{$b} = 1;
for (keys %h, keys %{$h{$a}}) {
print ref($_), "
";
}
THREAD SUPPORT
Tie::RefHash fully supports threading using the "CLONE" method.
STORABLE SUPPORT
Storable hooks are provided for semantically correct serialization and cloning of tied refhashes.
RELIC SUPPORT
This version of Tie::RefHash seems to no longer work with 5.004. This has not been throughly investigated. Patches welcome ;-)
LICENSE
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself
MAINTAINER
Yuval Kogman <nothingmuch@woobling.org>
AUTHOR
Gurusamy Sarathy gsar@activestate.com
'Nestable' by Ed Avis ed@membled.com
SEE ALSO perl(1), perlfunc(1), perltie(1)perl v5.14.2 2011-09-19 Tie::RefHash(3perl)