[EMAIL PROTECTED] wrote:
Hi
Hello,
I have a script which contains 2 hashes of file names as the keys and
md5 sums as the values. I am looking for ideas on fast and efficient
ways to compare the 2 hashes in the manner of the pseudo code below
Can you fill us in on the big picture? Perhaps
Yup, lol...
Wish I understood this! What is the line that does the search called? What do I
look up to read up on this?
Thanks!
jlc
From: Prabu Ayyappan [mailto:[EMAIL PROTECTED]
Sent: Tuesday, July 03, 2007 10:55 PM
To: Joseph L. Casale; beginners@perl.org
Subject: Re: formatting a string
A
I have a list:
@list = ('Exchange','Filter','DNS','Domain');
This is a list of arrays I also have of course to leverage this I am trying to
. the @ symbol on it during use.
foreach $vm (@list) {
my_sub(@ . $vm);
print @ . $vm\n;
}
The print likes this, but the
May you need eval?Like,
use strict;
use warnings;
my @list = ('Exchange','Filter','DNS','Domain');
my @Exchange = (1,2);
my @Filter = (3,4);
my @DNS = (5,6);
my @Domain = (7,8);
foreach my $vm (@list) {
print eval '@'.$vm,\n;
}
__END__
good luck.
2007/7/4, Joseph L. Casale [EMAIL
Read Perl reqular expression and search replace.
$perldoc perlretut
http://search.cpan.org/~nwclark/perl-5.8.8/pod/perlretut.pod
Joseph L. Casale [EMAIL PROTECTED] wrote:
v\:* {behavior:url(#default#VML);} o\:* {behavior:url(#default#VML);}
w\:*
Joseph L. Casale [EMAIL PROTECTED] wrote:
I have a list:
@list = ('Exchange','Filter','DNS','Domain');
This is a list of arrays I also have of course to leverage
this I am trying to . the @ symbol on it during use.
foreach $vm (@list) {
my_sub(@ . $vm);
On 07/03/2007 08:32 PM, Joseph L. Casale wrote:
I have an array with the following data in it:
/vmfs/volumes/467f06a5-7d59c067-35cb-0007e9153886/AN-DC (Win2003 Ent x64)/AN-DC
(Win2003 Ent x64).vmx
/vmfs/volumes/467f06a5-7d59c067-35cb-0007e9153886/AN-DC (Win2003 Ent x64)/Disc
1.vmdk
On Jul 4, 2:29 am, [EMAIL PROTECTED] (Joseph L. Casale) wrote:
I have a list:
@list = ('Exchange','Filter','DNS','Domain');
This is a list of arrays I also have of course to leverage this I am trying
to . the @ symbol on it during use.
foreach $vm (@list) {
my_sub(@ .
Joseph L. Casale wrote:
I have a list:
@list = ('Exchange','Filter','DNS','Domain');
This is a list of arrays I also have of course to leverage this I am trying to
. the @ symbol on it during use.
foreach $vm (@list) {
my_sub(@ . $vm);
print @ . $vm\n;
}
The
Can someone explain to me what this script really does? I mean I see that it
lists dir within dir. But what is the code doing? For example all the blue
highlighted stuff, what is it doing?
#!/usr/bin/perl
$startdir = /lib;
$level = 0;
list_dirs($startdir,$level);
sub list_dirs(){
my $dir =
From: [EMAIL PROTECTED] [EMAIL PROTECTED]
Hi
I have a script which contains 2 hashes of file names as the keys and
md5 sums as the values. I am looking for ideas on fast and efficient
ways to compare the 2 hashes in the manner of the pseudo code below
--
%base_hash
%new_hash
for keys
Tom Phoenix wrote:
On 7/2/07, Mathew [EMAIL PROTECTED] wrote:
foreach my $date (@searchDate) {
while (my $ticket = $tix-Next) {
Seeing this worries me. I don't know enough about what's going on to
tell whether it's wrong or not, but it looks wrong. When the outer
loop goes on to
From: Amichai Teumim [EMAIL PROTECTED]
Can someone explain to me what this script really does? I mean I see that it
lists dir within dir. But what is the code doing? For example all the blue
highlighted stuff, what is it doing?
There is no highlighting in a plain text email!
Hi,
it was hard to see the blue stuff.. :)
On Wed, 4 Jul 2007 16:14:47 +0300
Amichai Teumim [EMAIL PROTECTED] wrote:
#!/usr/bin/perl
$startdir = /lib;
$level = 0;
list_dirs($startdir,$level);
calls list_dir with $startdir and $level.
sub list_dirs(){
my $dir = shift (@_);
Tom Phoenix wrote:
On 7/2/07, Mathew [EMAIL PROTECTED] wrote:
foreach my $date (@searchDate) {
while (my $ticket = $tix-Next) {
Seeing this worries me. I don't know enough about what's going on to
tell whether it's wrong or not, but it looks wrong. When the outer
loop goes on to
On 7/4/07, Mathew Snyder [EMAIL PROTECTED] wrote:
foreach my $user (keys %tickets) {
foreach my $env (keys %{ $tickets{$user} }) {
foreach my $tikID (keys %{ $tickets{$user}{$env} }) {
foreach my $subject (keys %{
On Jul 4, 2:05 am, [EMAIL PROTECTED] (John W. Krahn) wrote:
I have a script which contains 2 hashes of file names as the keys and
md5 sums as the values. I am looking for ideas on fast and efficient
ways to compare the 2 hashes in the manner of the pseudo code below
Can you fill us in on
On 7/3/07, CM Analyst [EMAIL PROTECTED] wrote:
snip
ppm install c:\temp\Win32-API-0.41\API.pm
Searching for 'c:\temp\Win32-API-0.41\API.pm' returned
no results. Try a broader search first.
snip
Firstly, ppm installs ppd (Perl Package Description) files not pm
(Perl Module) files and secondly
Hi,
I have an application that creates and writes to an output file I need
to process. I need to process the file when it is completely written
to. I do not initially know how big the file will be in the end.
Further, the application does NOT put a write lock on the file while
it is writing it.
Hi ppl,
I have a some code that reads in a file, and then i have some if
statements. The if statement i want to change is
if (($DeviceType eq Switch) || ($DeviceType eq Router) ||
($DeviceType eq Hub) || ($DeviceType eq Access point))
what i would like to do is check each device type with
On 7/4/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
snip
What's the most efficient way of checking this? - one way is perhaps
inifinite loop checking mmtime until it is stable for a certain amount
of time?? I am not sure.
snip
Yep, that is about it. I usually use size rather than mtime
On 7/4/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
I have an application that creates and writes to an output file I need
to process. I need to process the file when it is completely written
to. I do not initially know how big the file will be in the end.
Further, the application does NOT
On Jul 4, 3:46 am, [EMAIL PROTECTED] (Daluk) wrote:
I have a some code that reads in a file, and then i have some if
statements. The if statement i want to change is
if (($DeviceType eq Switch) || ($DeviceType eq Router) ||
($DeviceType eq Hub) || ($DeviceType eq Access point))
what i
On 7/4/07, Chas Owens [EMAIL PROTECTED] wrote:
On 7/4/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
snip
What's the most efficient way of checking this? - one way is perhaps
inifinite loop checking mmtime until it is stable for a certain amount
of time?? I am not sure.
snip
Yep, that is
Hi,
I am trying to use the following:
($volume,$directories,$file) =
File::Spechttp://perldoc.perl.org/File/Spec.html-splitpath( $path );
I am leveraging this fine, but would like to shove the last directory from the
path in $directories into a new var.
Is there a function from this module
On 7/4/07, Joseph L. Casale [EMAIL PROTECTED] wrote:
($volume,$directories,$file) =
File::Spechttp://perldoc.perl.org/File/Spec.html-splitpath( $path );
I am leveraging this fine, but would like to shove the last directory from the
path in $directories into a new var.
Is there a function
ppm install c:\temp\Win32-API-0.41\API.pm
Searching for 'c:\temp\Win32-API-0.41\API.pm' returned
no results. Try a broader search first.
Can anyone please advise on what I need to do next?
Thanks in advance.
Amad.
the package should contain a file with a ppd extension. cd to the
Hi,
When I try to get the arp table from any type of device (oid
1.3.6.1.2.1.4.22.1.3) with the snmp_util module, it returns the 6
character, instead of the hex byte value.
How can I convert a 6 byte word into the hex equivalent like
00:0a:8b:bd:62:8a.
Any help greatly appreciated
Just found that. I suppose I could use it, then get the size of the array and
use the last indices? Is there a cleaner way to do it?
Thanks!
jlc
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Tom Phoenix
Sent: Wednesday, July 04, 2007 1:38 PM
To: Joseph
On 7/4/07, Joseph L. Casale [EMAIL PROTECTED] wrote:
Just found that. I suppose I could use it, then get the size of the array and
use the last indices? Is there a cleaner way to do it?
pop?
--Tom Phoenix
Stonehenge Perl Training
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional
On 7/4/07, Bernard [EMAIL PROTECTED] wrote:
When I try to get the arp table from any type of device (oid
1.3.6.1.2.1.4.22.1.3) with the snmp_util module, it returns the 6
character, instead of the hex byte value.
How can I convert a 6 byte word into the hex equivalent like
00:0a:8b:bd:62:8a.
Tom,
Many thanks, works great.
Bernard
Tom Phoenix wrote:
On 7/4/07, Bernard [EMAIL PROTECTED] wrote:
When I try to get the arp table from any type of device (oid
1.3.6.1.2.1.4.22.1.3) with the snmp_util module, it returns the 6
character, instead of the hex byte value.
How can I convert
On 7/4/07, Joseph L. Casale [EMAIL PROTECTED] wrote:
Just found that. I suppose I could use it, then get the size of the array and
use the last indices? Is there a cleaner way to do it?
Thanks!
jlc
snip
You can use negative indices to count from the end of the array:
my @a = (1, 2, 3, 4, 5,
Bernard wrote:
Hi,
Hello,
When I try to get the arp table from any type of device (oid
1.3.6.1.2.1.4.22.1.3) with the snmp_util module, it returns the 6
character, instead of the hex byte value.
How can I convert a 6 byte word into the hex equivalent like
00:0a:8b:bd:62:8a.
$ perl
Dang, you perl guys thought of everything!
Thanks!
jlc
From: Chas Owens [EMAIL PROTECTED]
Sent: Wednesday, July 04, 2007 3:21 PM
To: Joseph L. Casale
Cc: Tom Phoenix; beginners@perl.org
Subject: Re: File::Spec-splitpath
On 7/4/07, Joseph L. Casale [EMAIL
On 7/4/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
Hi all,
ok.i will go straight to the problem but d bear with me a it's
a complex problem .
first the thing that is to be done..
i have this file which is in a tab delimited format.This is a huge
file with 3000 experiments and
oops sorry for the last mail...i pressed the enter button
inadvertently.
neways here is the problem...
File1:example.txt
ProbeNames Exp1Exp2Exp3Exp4Exp5
244901_at 24.346.437.419.559.6
244902_at 36.692.449.542.4
On Wed, 2007-07-04 at 19:00 +0200, Martin Barth wrote:
Hi
if (($DeviceType eq Switch) || ($DeviceType eq Router) ||
($DeviceType eq Hub) || ($DeviceType eq Access point))
what i would like to do is check each device type with where the first
letter is uppercase or lowercase
On 7/4/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
File1:example.txt
ProbeNames Exp1Exp2Exp3Exp4Exp5
244901_at 24.346.437.419.559.6
244902_at 36.692.449.542.4 29.6
244903_at 46.4
Jeff == Jeff Pang [EMAIL PROTECTED] writes:
Jeff May you need eval?Like,
No. Wrong direction for a solution. Don't suggest things like this. Plenty
of proper answers elsewhere in the thread, so I won't repeat them.
DO NOT USE STRING EVAL. EVER.
Until you understand why I said that. :)
--
I have the following code (it's a snippet so it may seem silly, but altogether
it would make sense as I am forcing one array into it for a test):
#!/usr/bin/perl -w
@DNS = (/vmfs/volumes/467f06a5-7d59c067-35cb-0007e9153886/Web DNS (Win2003
Std x32)/Web DNS (Win2003 Std
On 7/4/07, Joseph L. Casale [EMAIL PROTECTED] wrote:
snip
if ($state == 'on') {
'vmware-cmd $_[0] stop soft';
my $tools = `/usr/bin/vmware-cmd \$_[0]\
gettoolslastactive -q`;
On 7/4/07, Chas Owens [EMAIL PROTECTED] wrote:
snip
snip
The second I am sure is the darn () in the file names I am feeding
into the function. Can someone shed some light :) I need to call the
first indices of many arrays that get passed into this function, so I
was thinking $_[0] was what I
Thanks for the help. The while loop move makes sense! I knew this looked silly,
but with the rest of the code, I am looping in many arrays. In this section I
am only working with the first indice (the .vmx one).
Is it actually incorrect to run: stop_it(@DNS); aside from maybe looking
strange?
Heh, I am running out of hair:P
I get two errors to start, one is the warning that is better write:
my ($vm) = $_[0];
instead of
my ($vm) = @_[0];
And the other is about the use of the global @_ (huh) with my?
I have this now:
#!/usr/bin/perl -w
@Exchange =
Heh,
Clearly I need to sleep!
This doesn't even work either?
#!/usr/bin/perl -w
@list = (Exchange,Filter,DNS,Domain)
sub stop_it {
$vm = $_[0];
print $vm\n;
}
stop_it(@list)
What is wrong here?
jlc
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands,
On 7/4/07, Joseph L. Casale [EMAIL PROTECTED] wrote:
Heh,
Clearly I need to sleep!
This doesn't even work either?
#!/usr/bin/perl -w
@list = (Exchange,Filter,DNS,Domain)
snip
You are missing your quotes.
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL
On 7/4/07, Joseph L. Casale [EMAIL PROTECTED] wrote:
Heh, I am running out of hair:P
I get two errors to start, one is the warning that is better write:
my ($vm) = $_[0];
instead of
my ($vm) = @_[0];
The proper way to say this is
my ($vm) = @_;
And looking at your data I would suggest
my
@list = (Exchange,Filter,DNS,Domain);
sub stop_it {
$vm = $_[0];
print $vm\n;
}
stop_it(@list)
A semi-colon is missing in the list assignment.
if you want to get the first value of the list then you have to use
$_[0]
Second Value means
$_[1] and so on...
49 matches
Mail list logo