Hi all,
We have three web servers (say a,b,c) that take a similar file (xyz.txt) and
gives the results.
Now, we want to make a meta-server with three check-boxes and only one input
form.
The purpose is to accept a single file and run the 'checked' server and
provide the results as two separate
Dear Perl users,
I have 2 columns, tab separated file which looks like
A 4
B 3
C 1
A 3
B 3
First column refers to name and second to value. I have to calculate
total score on each 'name'; in my case:
A 7
B 6
C 1
Here is the code; but it doesn't work.
#
Hi,
You should always have
use strict;
use warnings;
in your perl code.
u misspelled the hash %values in the for loop
On Monday 29 May 2006 16:47, Andrej Kastrin wrote:
foreach $w (sort by_number keys %values) {
print $w\t$value{$w}\n
}
Shameer
--
--
To unsubscribe, e-mail:
I BioKid mailto:[EMAIL PROTECTED] asked:
We have three web servers (say a,b,c) that take a similar
file (xyz.txt) and gives the results.
Now, we want to make a meta-server with three check-boxes and
only one input form.
The purpose is to accept a single file and run the 'checked'
server
Hey
problem with your for loop
#!/usr/bin/perl -w
while () {
chomp;
($name,$value)=split(/\t/);
$ha{$name}+=$value;
}
foreach $i(sort keys %ha)
{
print$i. .$ha{$i}.\n;
}
- Chandru
Andrej Kastrin wrote:
Dear Perl users,
I have 2 columns, tab separated file which looks like
A 4
...I agree perhaps I could make a small script that could do what he wants
Is what you want right?
-Original Message-
From: Chad Perrin [EMAIL PROTECTED]
Sent: 05/26/2006 11:45:39 AM
To: beginners@perl.org beginners@perl.org
Subject: Re: export script problem
On
there is more than one way to do it
is there an easier way to do this map:
my $index = 0;
while( my @a = $SQL-fetchrow_array) {
my %a = map { $fieldnames[$index++] = $_ } @a;
print $_ = $a{$_}\n for (keys %a);
}
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands,
Jenda Krynicky wrote:
From: John Ackley [EMAIL PROTECTED]
there is more than one way to do it
is there an easier way to do this map:
my $index = 0;
while( my @a = $SQL-fetchrow_array) {
my %a = map { $fieldnames[$index++] = $_ } @a;
print $_ = $a{$_}\n for (keys %a);
}
chen == chen li [EMAIL PROTECTED] writes:
chen I recently read chapter 11 about OOP from the online
chen book learning perl. Here are some example codes
chen from chapeter 11:
There is no online book named Learning Perl. If you see it online, please
report the copyright violation to [EMAIL
I want to monitor a daemon's logs that updates randomly through the day
and night. Is there a way to open the log file and read the new records
as they come in the same way as tail -f does?
Thanks
Ken
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL
Ken Foskey wrote:
I want to monitor a daemon's logs that updates randomly through the day
and night. Is there a way to open the log file and read the new records
as they come in the same way as tail -f does?
Sure, look on cpan for File::Tail::App and File::Tail
--
To unsubscribe, e-mail:
On May 29, 2006, at 18:19, Ken Foskey wrote:
I want to monitor a daemon's logs that updates randomly through the
day
and night. Is there a way to open the log file and read the new
records
as they come in the same way as tail -f does?
Sure, with File::Tail for example.
-- fxn
--
To
Sorry but what I mean is Beginning Perl from
http://learn.perl.org/library/beginning_perl/
And BTW I have a hard copy of Learning Perl by
myself.
Li
--- Randal L. Schwartz merlyn@stonehenge.com
wrote:
chen == chen li [EMAIL PROTECTED] writes:
chen I recently read chapter 11 about OOP
John W. Krahn [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
John W. Krahn wrote:
Dan wrote:
how can i substitute, or remove anything that's not an alphanumerical
character in a string?
s/[[:alnum:]]+//g;
Sorry, that should be:
s/[^[:alnum:]]+//g;
John
--
use Perl;
On Mon, May 29, 2006 at 01:17:52PM -0700, chen li wrote:
Sorry but what I mean is Beginning Perl from
http://learn.perl.org/library/beginning_perl/
And BTW I have a hard copy of Learning Perl by
myself.
I had a sneaking suspicion you weren't talking about the Llama book,
especially since
--- Chad Perrin [EMAIL PROTECTED] wrote:
On Mon, May 29, 2006 at 01:17:52PM -0700, chen li
wrote:
Sorry but what I mean is Beginning Perl from
http://learn.perl.org/library/beginning_perl/
And BTW I have a hard copy of Learning Perl by
myself.
I had a sneaking suspicion you
On Mon, May 29, 2006 at 06:39:57PM -0700, chen li wrote:
--- Chad Perrin [EMAIL PROTECTED] wrote:
On Mon, May 29, 2006 at 01:17:52PM -0700, chen li
wrote:
Sorry but what I mean is Beginning Perl from
http://learn.perl.org/library/beginning_perl/
And BTW I have a hard copy
Hi,
I was trying to use Net::SSH::Perl to log into a remote box and execute a
program with pre-defined commands, something like:
#!/usr/bin/perl
use strict;
use Net::SSH::Perl;
my $ssh = Net::SSH::Perl-new(ip, debug = 0);
$ssh-login(name, password);
my ($return) = $ssh-cmd(minicom -S
Hi,
I have some rather big chunk of data, returned from ldap server. The
format is simple:
Displa name [EMAIL PROTECTED]
Simply displying data as is is simple, but how do I sorted by
display name?
pls note that display name contains space and might not unique so I
can't put it on %hash.
- Original Message -
From: Beast [EMAIL PROTECTED]
Date: Wednesday, May 31, 2006 1:59 pm
Subject: sorting?
Hi,
I have some rather big chunk of data, returned from ldap server.
The
format is simple:
Displa name [EMAIL PROTECTED]
Simply displying data as is is simple, but how
20 matches
Mail list logo