index.dat file

2007-09-12 Thread Mark Funk
Folks, Anyone have Perl code that reads the index.dat file on winders? TIA, David M. Funk President/CEO Tivoli Certified Enterprise Consultant Specializing in Network and Systems Management Solutions Trinity Solutions 604 Cassandra Dr. Suite 204 Cranberry Twp., PA 16066 Phone: 72

How do I read the Response Headers form URL post?

2007-08-23 Thread Mark Funk
Folks, How do I read the response header information. I am using LWP gets code snippet.. use LWP::Debug qw(+ -conns); use LWP::UserAgent; use HTTP::Request::Common; use HTTP::Response; use HTTP::Cookies; use HTTP::Headers; use IO::Socket::SSL; my $ua = LWP::UserAgent->new; $ua->timeou

hash table question

2007-08-08 Thread Mark Funk
What exactly does the following Perl code do? %hash=(); open(PREVFILE, $prevfile) or die("Unable to open previous file"); while() { chomp; last if /BREAK/; $seen{$_}++; } close(PREVFILE); TIA, David M. Funk President/CEO Tivoli Certified Enterprise Consultant Specializing in Netwo

Odd output using IO::String & IO::Socket::INET

2007-05-22 Thread Mark Funk
Folks, I wrote an SFTP perl script on windows and am getting some strange output. Anybody seen the follow before? D:\scripts>perl d:\scripts\sftp1.pl [EMAIL PROTECTED] -r /home/mark -c ls Please enter password : IO::Socket::INET at C:/Perl/site/lib/Net/SSH/Perl/SSH2.pm line 295 IO::Soc

RE: File attachments via Perl using Net::SMTP

2007-05-15 Thread Mark Funk
Yes it is possible. This is how I have done it in the past... try this... . . . use MIME::Lite; use Net::SMTP; ### Adjust sender, recipient and your SMTP mailhost my $from_address = 'Me'; my $to_address = $email_addy; my $mail_host = "$mail_host"; ### Adjust subject and body m

Perl Net::LDAP question

2006-12-01 Thread Mark Funk
Folks, I am trying to do an LDAP lookup to see if a user belongs to a certain group. I connect ok and LDAP only sends me the first member of the attribute group. Is there a way to list all members of an attribute group? Code snippet: use NET::LDAP; $ldap = Net::LDAP->new( 'tcpauthprd' ) or die

Certificate renewed...

2006-12-01 Thread Mark Funk
Folks, I have some Perl scripts that connect to websites via SSL. All of the sudden they stopped working and of course I did not change anything. After talking to the web guys, they said that they had to get a new certificate. Anyone know what I need to do on my side to get that cert imported

Scripts just stopped working..

2006-11-28 Thread Mark Funk
Folks, I wrote some Perl scripts that connects to an HTTP server and determines the availability of a web page.. This has been working fine for about six months. All of the sudden the script stopped working and I made NO change. Script snippet: $ua = LWP::UserAgent->new; $ua->agent("" . $ua->

What do you do?

2006-11-07 Thread Mark Funk
Folks, I have several Perl scripts that log into servers and I keep the username and password hardcode (in plain text) in the script. I would like to use an encrypted method. Just wondering what options are out there. What do you do? Thanks, David M. Funk President/CEO Tivoli Certified Enterpr

WWW::Mechanize problem

2006-09-27 Thread Mark Funk
Title: WWW::Mechanize problem Folks,   I am having trouble submitting a form because it is using an image to click on.   HTML Code:     I have tried to use the find_all_image function, but it doesn't seem to find it. If I get all the forms, it doesn't list it either. How do I su

Problem with checkbox solved !!

2006-09-11 Thread Mark Funk
I used the following code that works...     $mech->form_number('5');  $mech->tick('samenet', 'on', 0);  $mech->submit_form(form_number => 5);   just trying several different things and $mech->tick with a value of "on" and a set value off "0" unchecks that rascal...   Thanks,   Da

Error using WWW-Mechanize-1.14

2006-09-11 Thread Mark Funk
Folks,   I keep getting the following error when I try to access a webpage and simply uncheck a dang checkbox.   Can't call method "find_input" on an undefined value at c:/Perl/site/lib/WWW/Mechanize.pm line 1328, line 1.   Anyone experience this error and have a fix/suggustion?     Code

perl grep help

2006-08-14 Thread Mark Funk
I have a list of IP addresses that I am getting status for.  Where possible I will use a socket connection.   However, some of the IP addresses I need to ping. I have a list that I need to parse through and perform a ping against.   The list can look like this:   @PINGONLY =   172.