Hi all,
I am trying to do something and it is probably very simple. I have been looking online for help and found a lot of interesting information but I am somehow not able to put the pieces together.
What I am trying to do:
I have a column which contains information. There are duplicates in...
read the file line by line
split on the :
put it in a hash with key = userx and value = right side of the :
check with each line if the key already excists and if so.. add the new value to the end of the excisting value belonging to the existing key.
hmmm just wandered over this post and read it and I might be wrong but.
If you set $keywords{$word}=0; it will never excist and will never increase cause $keywords{$words} = not true
if (!$keywords{$word}){$keywords{$word} = 1};
else { $keywords{$words}++};
with the above you can set...
Hi everyone,
I have certain template files. The files look like this:
###########
# template name:
# purpose:
# etc...
###########
config line 1 containing a <VARIABLE>
another <VARIABLE1> in a config line
and another one. This time it is <VARIABLE3>
.
.
.
etc...
In my script I have the...
Thanks for the quick reply.
The lines will not be longer than 100 letters and numbers. I think (also from reading other posts) that I underestimated Perl. I have seen people wanting to push files the size of a Gig into a script. My file is peanuts compared to that.
I have been reading through...
Hi everyone,
I am writing a script using Perl/Tk wich has as a goal to register information and with that information to be able to write switch configs.
This script has a couple of parts:
The switch part. On this part you can add, find and change switch information. I have a file wich...
I believe you need an elsif around the last opening and closing of RECORDS.
so.. if $ref matches the 4 digit number print the record to screen. In all other cases write $ref to the Data.txt.
the last open and close and teh writing to the file is done all the time in your script.
InDenial
vipergg,
more expensive switches do this too.. although not the 2950 as far as I know. For example... the 3750, 2940, 2970 support auto mdix...
InDenial
Looks to me like a negotiation issue... you are getting a false speed/duplex setting on the interfaces.
Check this by doing a show int FastEthernet0/x.
Check the settings on the nic on the linux box and compare it to what the interface negotiated. If the settings on the interface are not what...
Maybe you can try to do a configuration on the passport. Don't do a save config and check in which of the two: runtime or running the change is made. Then save the config and check what changes in the runtime and running. This way to can figure out which is what.
InDenial
not sure about the net::smtp module but isn;t is possible to install the module in your own server space by copying the module there and doing a use lib? if so you can get your own module from cpan wich might work...
works with telnet.pm...
Anyway.. good luck in finding another solution.. too...
Well I thought you didn't use strict and warnings since I got an error when I tried your script. In the part where you call the send_mail sub you forgot a " at the last string wich is the reason why those two persons did not get their emails...
Also.. running the script using debug => 1 might...
1DMF.
turn on warnings and strict and run the script again. You will see that there and where something is wrong.
After I made the correction the script works. I have a few remarks though:
In the calling of the sub send_mail the $body is between "". Although it works with quotes I am not sure...
The thing is that based on source and detination mac- or ip-address passports choose over wich member of the mlt the data goes.
It might be that one link is not working very well due to bad fibre wich is not noticed since all the other data goes over the working link. Maybe you could check if...
Googer,
A few questions:
Did it work before?
Does it work when only one or the other mlt member is active?
Are there other mlt's active in the path from client to server?
InDenial
I am not sure wich software version you are using and the exct number does not matter much, but in the past community settings were visible doing a show config. Newer software versions don't show the snmp community strings when doing a show config. From memory I think a show snmp info will bring...
A passport has several community strings..
ro
rw
rwa
layer2
layer3
I believe there are six.. but I can not remember the last one.
you have to set community strings for all of them.. I think the layer2 also has public as community string.. hence... they could query the information you posted...
#!/bin/perl -w
use strict;
use warnings;
use Net::SMTP;
my $mailserver = 'mail.domain.cmo';
my @send_list;
my $from = 'mail@domain.com';
my @to = ('to@domain.com','to@domain2.com');
my @bcc = ('bcc@domain.com','bcc@domain2.com');
my $subject = "Test subject";
my $message = "This is a test...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.