We are trying to set up an export process to automatically establish a VPN connection before running it's normal tasks. The connection is usually established manually via the Cisco VPN client. I'm not finding much on CPAN. There was only one module...and I wasn't successful in getting it...
Couldn't get that to work. We have a module that is controlling the connections. We just added a "status" method to it to return the state of the connection as "defined" or "undefined".
Cheers,
Sloppyhack
I am trying to do some cleanup of database connections when a GUI window is closed or destoyed. If the database handle is currently "connected" I want to rollback all transactions associated with database handle and disconnect. If I try to rollback and disconnect a database handle that is not...
Thanks for the suggestion but I beleive that is just putting the widget (and its text) on the left side. It is not changing the placement of the text within the widget. Changing the code you gave me to "-justify => 'right'" produces the same result.
I really think this is just a bug. In the...
#!/usr/bin/perl -w
use strict;
use Tk;
my $mw = MainWindow->new();
$mw->Label(-text => "TESTING", -background => 'white', -width => 50, -justify => 'left')->pack();
MainLoop;
This code should create a label with the text on the left side. Doesn't work. Puts it in the center. This must be a...
I figured it out. I'm using ^(.{0,30})[^a-z0-9\/] and using the text that was captured within the parens as my new string. I can't seem to use "non-greedy" while archoring to the end of the string. Works if achoring from the front. Don't need it with the expression I'm using though.
Thanks...
I'm trying to truncate a string at a non-alphanumeric character to include the most characters to still be within a 30 character maximum. It's being greedy even though I'm using the "?" non-greedy version of the quantifier.
Here's the string....
BIT|DRL|6MM|12.8CM|CTR|CNRSTN-SR...
I have a TK gui used for updating a database. I'm having a problem with the users closing the window via the button in the top right hand corner and leaving the database connection open. I would like to tie the same "cleanup" process associated with the "CLOSE" button I created to the standard...
I have several Perl apps that run external Perl processes. I'm running the external processes for purposes of memory management and organization. It works very well, but the external processes only print their results to the "main" app when they finish and close. I want to be able to print to...
Yeah. It's usually a silly little problem. If I can't find the solution within the next day or so...I'll revert everything back to older versions and hope that fixes things. Seems like someone would have come across this before.
Cheers,
Sloppyhack
I've been connecting to an oracle database via Perl for years. I updated my DBD-Oracle driver to the most current one and now I keep getting error "ORA-12705: invalid or unknown NLS parameter value" and it wont make the connection.
The only NLS value that I'm seeing on the machine I'm...
Yeah. That's all old stuff that I'm sure any real programmer could improve. I did run it with "use warnings"...and got nothing unusual. The usual undeclared variable warning. I'll try turning on diagnostics to see what happens.
Cheers,
Sloppyhack
Thanks. Here's one spot where premature exit is happening. The script reads 6.6 million lines from one file then comes over to read this file which it will compare to the 6.6 million lines it has already processed. Gets to line 300 of the second file and just stops. No error is thrown by...
I have a script that analyzes contents of a file and compares it's contents to another file. This script has been working fine...but when we throw a large amount of data at it....it stops prematurely. The file has 6.6 million rows but there seems to be available memory on the machine when it...
rharsh's suggestion did it.
$total = scalar @{$hash{$name}};
Thanks rharsh!!!! And thanks to everyone who chimed in.
As for why I'm using such an eleborate data structure perluserpengo.....I have an application that determines differences in field values between a flat file and data in a...
I built a hash of arrays of hashes. I can access everything, but I need to do something with each hash within the array of hashes and am having trouble defining how many hashes exist in the array so I can use a 'for' loop to get each one.
The structure looks like...
Never mind. I'm reading that using variables within variables is generally not a good thing. Funny...I've read several places that it is a good thing and have actually used it a lot with success. I could do the same things with a hash though. I'll go that route. Sorry for the premature...
Getting an error....
can't use "string" as an array reference when "strict ref" is in use
Makes sense...as I'm using a new variable, but it still seems silly. Using array references has proven to be very powerful for me. Anyone know how to get around this? I love "use strict" but want to...
I'm consolidating multiple scripts via a wrapper script calling external processes with backticks. Didn't make that very clear. Just trying to find a good way to get the imput data from script to script.
Cheers,
Sloppyhack
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.