DBI::st
Does anyone know where I can find the DBI::st module? If have looked on CPAN and Activestate and cannot locate it. Thanks -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DBD::Sybase Question
I am relatively new and always trying new things and now I am trying to print the output of a select statement to a file. However I am having issues, the print statement just prints the IN file to the outfile and not the results of the select statement. Inserts, deletes, updates etc work fine. Any suggestions? Thanks #!/usr/bin/perl -w #use strict; #uses strict perl coding rule use DBI; use DBD::Sybase; my $server = 'Development'; my $db = 'mm_dev'; my $file = 'new_objects1.txt'; my $file1 = 'new_objects_sec.txt'; my $table = 'al_sec_window_id'; open IN, $file; open OUT, $file1; select OUT; while (IN) { chomp(@_ = split); my $dbh = DBI-connect(dbi:Sybase:server=$server, ghansen, jshjsh99 ) or die Can't Connect: $DBI::errstr\n; $dbh-do(use $db); my $sth = $dbh-prepare( select * from $table where w_id = '$_[0]' ); $sth-execute(); print $dbh; -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Win32 - Problem updating the registry
I am trying to update the Registry using a script from David Roth's book Win32 Perl Programming. The script appears to run, no errors, however the Key does not get added to the registry. Any help is appreciated. Thanks #!/perl/bin/perl -w use strict; use Win32::Registry; my $Path = 'Software\Microsoft\Office\9.0\Word\Options'; my $ValueName = AutoSave-Path; my $Key; if ($HKEY_CURRENT_USER -Open($Path, $Key)) { my($DataType, $Data); if ($Key-QueryValueEx($ValueName, $DataType, $Data)) { if ((REG_SZ == $DataType) || (REG_EXPAND_SZ == $DataType)) { #$Data =~ s/^c:/d:/i; $Key-SetValueEx($ValueName, 0, REG_DWORD, 1); } } } -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Mail::Sender
I receive the following error when using the Mail::Sender module. I am running it on Redhat 7.2. Any help in resolving this issue is appreciated. Thanks Use of uninitialized value in concatenation (.) or string at /usr/local/ActivePerl- 5.6/lib/site_perl/lib/5.6.1/Mail/Sender.pm Line 763, GENO line 1. Server error: 501 Command helo requires and argument -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Calculating Last Login on Unix
Is there a module or a method using perl to calculate the last login date for a user. I know I can do this by installing accounting, however I prefer not to do to other issues. Any thoughts/help is appreciated. Thanks -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Calculating Last Login on Unix
That gives me the information I want, the problem is it relies on wtmp. I believe wtmp gets nulled out on an ipl of the server and therefore nulls wtmp. Therefore I lose my history. What I am trying to do is identify user IDs that have not been used for say 60 days and get rid of them. Thanks for your help umm. you can run the last command and grep for the last login id. Is this what you need? --- [EMAIL PROTECTED] wrote: Is there a module or a method using perl to calculate the last login date for a user. I know I can do this by installing accounting, however I prefer not to do to other issues. Any thoughts/help is appreciated. Thanks -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] = Peter Lemus UNIX/NT Networks Engineer [EMAIL PROTECTED] --The universe is way too big for us to be alone; the real question is; who is out-there, besides us humans? --A wise man will be master of his mind, a fool will be its slave. Dr.David Schwartz. --Enjoy every moment of the day; Live like as if today was your last day alive, and perhaps, it might be. __ Do You Yahoo!? Yahoo! Health - your guide to health and wellness http://health.yahoo.com -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Mail::Sender
I am using Mail::Sender on AIX 4.3.3 and encounter the following error when running a script. Use of uninitialized value at /usr/opt/perl5/lib/site_perl/5.005/Mail/Sender.pm line 944, GEN0 chunk 5. Can't use an undefined value as filehandle reference at /usr/opt/perl5/lib/site_perl/5.005/Mail/Sender.pm line 944, GEN0 chunk 5. I have used this on other sysystem without any problems. Does anyone know if there are any issues with Mail::Sender on AIX 4.3.3? Thanks -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Mail::Sender Timeout
Where in the Sender.pm file can I find the parameter for timeout to the mail server? I need to increase this. I keep getting a cannot connect error. Thanks Grant -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Regex Help
Here is snippet of data: 'BRANCH ':'Kurt':'Strothenke' 'BRANCH ':'Michael':'Mulligan' 'BRANCH_SSC ':'Kevin':'Oaks' 'BRANCH_SSC ':'Thomas':'Grove' 'BRANCH_SSC ':'Stephen':'Orban' 'BRANCH_SSC ':'Gerald':'Parnell' 'BRANCH_SSC ':'Liane':'Mcintyre' 'BRANCHADMIN ':'Ann':'White' 'BRANCHADMIN ':'Brent':'Uhl' 2 problems: 1. I want to remove the tickmarks from fields 1,2,3 and put the data into an array using the : as a separator. I am having trouble getting rid of the tick marks, everything else works fine. 2. I want to match whole words only. I don't want to BRANCH to match on BRANCH_SSC or BRANCHADMIN. My code currently matches BRANCH with all three. Thanks for your help -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Email Attachments
Within my perl script running on AIX I am using qx to run mpack to attach text files to an out going mail message. This works fine, however it is limited. I want to be able to add body to the message explaining the text file attachment. Are there any modules within perl or other freeware utilities that will send attachments as well as body of a message.. Thanks for you help Grant -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Changing Lines per page? $=
I know it is possible to change the number of lines per page using $=. Can this be changed using a variable such as $=$page_length and if so where do you place this in your code? Any help is greatly appreciated. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Looping Code ?
What I am trying to do is get a total of line that matches a specific criteria and when it stops matching return the total to variable. If I have the following files: file1: file2: $line[1] = $field[0] AR AR AR ACCT AR ACCT ACCT ACCT ACCT and use the following: if ($line[1] = (/^:$field[0]/)) { $total = $count++;} I want $total for AR to = 3 and $total for ACCT = 4. When I run it I get 1 2 3 3 3 3 3 1 2 3 4 4 4 4 4 4 etc... Any thoughts Thanks -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Minor issues with format()
The only problem I have with the following script is it does not print the header information on the first page. I must have missed something. I would appreciate any comments/suggestions. Thanks #!/usr/bin/perl -w use strict; use constant PATH = /usr/local/scripts/security/sybase/user/; use constant GROUPS = group_files.doc; use constant ACCESS = user_access_all.doc; my $user; open F_GROUPS, PATH.GROUPSor die Can't open: $!; while (F_GROUPS) { chomp(my @field = split /:/); open OUT, $field[1] or die Can't open: $!; open F_ACCESS, PATH.ACCESSor die Can't open: $!; while (F_ACCESS) { chomp (); $user = $_; write OUT if (/$field[0]/); } format OUT_TOP = Company Name|| Report Title| Security Group First Name Last Name .. format OUT = @ $user, .. close OUT or die Can't close: $!; close F_ACCESS or die Can't close: $!; -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Minor issues with format()
I see what is happening, I think: I am writing to a separate file each time through the loop and format doesn't know that each time through is a different page, I think. Any pointers on how to tell format to print the header at the start of each new file would be greatly appreciated. Thanks for your help. The only problem I have with the following script is it does not print the header information on the first page. I must have missed something. I would appreciate any comments/suggestions. Thanks #!/usr/bin/perl -w use strict; use constant PATH = /usr/local/scripts/security/sybase/user/; use constant GROUPS = group_files.doc; use constant ACCESS = user_access_all.doc; my $user; open F_GROUPS, PATH.GROUPSor die Can't open: $!; while (F_GROUPS) { chomp(my @field = split /:/); open OUT, $field[1] or die Can't open: $!; open F_ACCESS, PATH.ACCESSor die Can't open: $!; while (F_ACCESS) { chomp (); $user = $_; write OUT if (/$field[0]/); } format OUT_TOP = Company Name|| Report Title| Security Group First Name Last Name .. format OUT = @ $user, .. close OUT or die Can't close: $!; close F_ACCESS or die Can't close: $!; -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]