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...
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.