RE: naive LWP::Get question (perhaps JavaScript related?)
Have you looked at WWW::Salesforce? It requires a little more setup than a straight LWP call (and relies on SOAP::Lite), but is going to be a lot more reliable than screen scraping. -Conor On Jun 8, 2012 1:08 PM, "Ken Cornetet" wrote: > If you are on windows, you can “drive” IE via OLE, and screen-scrape the > results. > > ** ** > > Here’s a bit of code I used some time ago (way back when we had physical > servers) to get the warrantee information from an HP web site. > > ** ** > > sub GetWarranty { > > ** ** > > my $serial = shift; > > my $prod = shift; > > ** ** > > my $parms = 'country=US&' . > > "serialNumber1=$serial&" . > > 'BODServiceID=NA&' . > > "productNumber=$prod&" . > > 'RegisteredPurchaseDate='; > > ** ** > > my $ie = Win32::OLE->new('InternetExplorer.Application');* > *** > > ** ** > > $ie->Navigate(" > http://us.itrc.hp.com/service/ewarranty/warrantyResults.do?$parms";); > > ** ** > > # $ie->{Toolbar} = 0; > > # $ie->{StatusBar} = 0; > > # $ie->{Width} = 800; > > # $ie->{Height} = 400; > > # $ie->{Left} = 0; > > # $ie->{Top} = 0; > > ** ** > > while( $ie->{Busy} ) { > > Win32::Sleep(200); > > } > > ** ** > > # $ie->{Visible} = 1; > > Win32::Sleep(1000); > > ** ** > > # return "" unless defined $ie->Document; > > return "" unless $ie->Document; > > return "" unless $ie->Document->Body; > > # return "" unless defined $ie->Document->Body->{InnerHTML};* > *** > > ** ** > > my $res = $ie->Document->Body->{InnerHTML}; > > ** ** > > $ie->Quit; > > ** ** > > return "" unless $res =~ /Start Date/; > > ** ** > > $res =~ s/\n//g; > > $res =~ s/\r//g; > > ** ** > > $res =~ s/^..*Start Date<\/B><\/TD> colSpan=2>//; > > ** ** > > $res =~ s/<\/TD><\/TR>..*//g; > > ** ** > > $res =~ s/^ +//; > > $res =~ s/ +$//; > > ** ** > > return $res; > > } > > ** ** > > *From:* perl-win32-users-boun...@listserv.activestate.com [mailto: > perl-win32-users-boun...@listserv.activestate.com] *On Behalf Of *Greg > Aiken > *Sent:* Friday, June 08, 2012 3:23 PM > *To:* Perl-Win32-Users@listserv.activestate.com > *Subject:* naive LWP::Get question (perhaps JavaScript related?) > > ** ** > > hello perl users, today i am struggling to better understand what the > underlying issue is here. > > ** ** > > my employer uses a web based CMS system called 'salesforce.com'. > > ** ** > > using a web browser, i log into this site, i then use its web interface > and eventually display a 'customer record' web page in my browser. some > of the elements i see on the page include 'products they own', 'contacts', > 'recent activities', etc... > > ** ** > > if i; > > ** ** > > a. using the web browser, 'view page source' i can actually see/read the > ascii html code fragments that clearly list the customers contact names, > email addresses, etc... in other words, what i see on the screen of my > rendered web page (in the browser), im able to read the full underlying > html code fragments and data fragments when 'viewing page source'. > > ** ** > > b. save as the currently viewed web page to my local hard drive, and i > open the resulting *.htm file with a text editor, i am once again able to > see all elements, to include the customers contact names and their emails. > > > ** ** > > now i had the thought, using LWP::Get i should be able to simply get this > same URL thats presented in my web browser. > > ** ** > > my first test. > > ** ** > > 1. i copied this URL and opened a new tab in my web br
RE: AD / ldap update
Thanks all for your assistance. I directly contacted Aaron Giuoco as a result of stumbling across his query here - http://www.nntp.perl.org/group/perl.ldap/2007/02/msg2489.html and he was good enough to provide me his working script. Thanks all who contacted me directly or through the list. I will take a further look at Win32::Exchange as I have a load more Exchange / AD related work coming down the pipe. Regards, Conor Lillis Senior Systems Administrator Group Infrastructure Services – Technical Services Group Operations Anglo Irish Bank Corporation Ltd Tele: +353 1 619 1819 Mobile: +353 86 815 1188 Fax: mailto:conorlil...@angloirishbank.ie www.angloirishbank.ie Please consider the environment before printing this e-mail. -Original Message- From: Steven Manross [mailto:ste...@manross.net] Sent: 24 September 2011 15:45 To: Conor Lillis; perl-win32-users@listserv.ActiveState.com Subject: RE: AD / ldap update So, While you may or may not be using Microsoft Exchange, I wrote a Module that does a lot of Active Directory calls that help you with tasks like adding extra SMTP email addresses, etc (because it gets all this stuff into the correct format. Win32::Exchange does a lot of this for you. It use Win32::OLE to do the AD property sets. It comes with sample scripts, and documentation on how to use each function. While Microsoft decided to only allow Powershell scripting to things like Creating mailboxes in Exchange 2007 and 2010 (which invalidates Perl access to a lot of the functionality of Exchange), Active Directory property modifications should still work fine. However, I don't have a lab to work with against Exchange 2007 at the current time and can't test against that current configuration. The function in question that you really want to pay attention to is SetAttributes.. If you are using Exchange 2007, the SetAttributes parts will still work since you are really just setting AD properties for the user account. I use the CDO.Person interface for making manipulations like that. Here is a slightly modified excerpt from the example script that is provided in my module. If you use Exchange then My example script might work out of the box for you. Otherwise, you might need to edit it a little. If you don't use Exchange, you could take the _E2KSetAttributes or _E55SetAttributes functions and modify it a little to suit your needs. However, either way, this module might give you some insights into how to form the proxyaddresses (as an array) to the LDAP call you are currently trying to make work. http://search.cpan.org/~smanross/Win32-Exchange_v0.046a/ if (!($provider = Win32::Exchange::Mailbox->new($info_store_server))) { print "$rtn - Error returning into main from new ($Win32::Exchange::VERSION)\n"; exit 0; } if ($ver{ver} =~ /^6\../) { e60(); # E2K03 is the same as E2K. } sub e60 { if ($mailbox = $provider->GetMailbox($mailbox_alias_name)) { print "Got Mailbox successfully\n"; } else { print "Mailbox did not exist\n"; exit 0; } #be careful with proxy addresses.. You are deleting any addresses that may exist already #if you set them via ProxyAddresses (you are now forewarned). push (@$proxies,'SMTP:'.$mailbox_alias_name.'@'.$email_domain); push (@$proxies,'SMTP:secondary@'.$email_domain); push (@$proxies,'SMTP:primary@'.$email_domain); push (@$proxies,'SMTP:tertiary@'.$email_domain); $Attributes{"IMailRecipient"}{ProxyAddresses} = $proxies; if (!$mailbox->SetAttributes(\%Attributes)) { print "Error setting 2K Attributes\n"; exit 0; } else { print "Set Attributes correctly\n"; } } Steven From: perl-win32-users-boun...@listserv.activestate.com [mailto:perl-win32-users-boun...@listserv.activestate.com] On Behalf Of Conor Lillis Sent: Thursday, September 22, 2011 4:02 AM To: perl-win32-users@listserv.ActiveState.com Subject: AD / ldap update Hi all, I have a requirement to add a new primary SMTP address to our users, and retain the existing primary SMTP address as an alias. The attribute in AD that holds these values is "proxyAddresses". Exchange uses any SMTP values in lowercase (eg smtp:co...@angloirishbank.ie) as aliases, and will stamp outgoing SMTP email with the value that starts with SMTP: uppercase (eg SMTP:conorlil...@angloirishbank.ie). I have attached below the script I am trying to use for proof of concept, and while I am able to retrieve the current attribute values, I am unable to successfully write the new values to AD. I should clarify that I am basing the script on previous working scripts and various articles on the web, and am not a full time coder so layout / coding is not necessarily optimum ;-) Any assistance greatly appreciated. I am testing in disabled accounts in the OU be
RE: AD / ldap update
As an additional test, I used MS ADSI edit to delete the current primary address and add in the required new email address from the proxyaddresses field. (with ADSI connected to a specific domain controller.) When I run the script below against the same DC, it does not list the addition of the new SMTP address, but the deletion of the old primary SMTP address is shown. However (and here’s the weird thing) - checking the user properties in AD and ADSI shows the new primary address as I would hope to see them if my script was functioning.,,, The new domain is defined in Exchange recipient polices (currently as a secondary, not primary, but this works fine for other secondary domains we also route mail for). Regards, Conor Lillis Senior Systems Administrator Group Infrastructure Services – Technical Services Group Operations Anglo Irish Bank Corporation Ltd Tele: +353 1 619 1819 Mobile: +353 86 815 1188 Fax: mailto:conorlil...@angloirishbank.ie www.angloirishbank.ie P Please consider the environment before printing this e-mail. From: Conor Lillis Sent: 22 September 2011 12:28 To: 'Angelos Karageorgiou'; perl-win32-users@listserv.ActiveState.com Subject: RE: AD / ldap update Hi Angelos, Thanks for coming back to me. The account does have the rights - as part of testing I have successfully modified the displayName attribute. Regards, Conor Lillis Senior Systems Administrator Group Infrastructure Services – Technical Services Group Operations Anglo Irish Bank Corporation Ltd Tele: +353 1 619 1819 Mobile: +353 86 815 1188 Fax: mailto:conorlil...@angloirishbank.ie www.angloirishbank.ie P Please consider the environment before printing this e-mail. From: perl-win32-users-boun...@listserv.activestate.com [mailto:perl-win32-users-boun...@listserv.activestate.com] On Behalf Of Angelos Karageorgiou Sent: 22 September 2011 12:19 To: perl-win32-users@listserv.ActiveState.com Subject: Re: AD / ldap update Without going through your code a quick question , does the username that you are using to authenticate against AD have Administrative level privileges ? On Thu, 22 Sep 2011 12:02:21 +0100, Conor Lillis wrote: Hi all, I have a requirement to add a new primary SMTP address to our users, and retain the existing primary SMTP address as an alias. The attribute in AD that holds these values is “proxyAddresses”. -- Angelos Karageorgiou http://www.linkedin.com/in/unixgr ** Private, Confidential and Privileged. This e-mail and any files and attachments transmitted with it are confidential and/or privileged. They are intended solely for the use of the intended recipient. The content of this e-mail and any file or attachment transmitted with it may have been changed or altered without the consent of the author. If you are not the intended recipient, please note that any review, dissemination, disclosure, alteration, printing, circulation or transmission of this e-mail and/or any file or attachment transmitted with it, is prohibited and may be unlawful. This e-mail and any files and attachments transmitted with it are unencrypted unless specifically advised otherwise. If you have received this e-mail or any file or attachment transmitted with it in error please notify Anglo Irish Bank Corporation Limited, Stephen Court, 18/21 St Stephen's Green, Dublin 2, Ireland, telephone no: +353-1-6162000. Directors: A.M. Dukes Chairman, A.M.R. Aynsley (Australian) Chief Executive, N. Cawley, A. Eames, M.A. Keane, P.G. Kennedy Registered Office: Stephen Court, 18/21 St Stephen's Green, Dublin 2 Ireland Registered in Ireland: No 22045 Anglo Irish Bank Corporation Limited is regulated by the Central Bank of Ireland. Anglo Irish Bank Corporation Limited (trading as Anglo Irish Bank Private Banking) is regulated by the Central Bank of Ireland. Anglo Irish Assurance Company Limited is regulated by the Central Bank of Ireland. ** ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
RE: AD / ldap update
Hi Angelos, Thanks for coming back to me. The account does have the rights - as part of testing I have successfully modified the displayName attribute. Regards, Conor Lillis Senior Systems Administrator Group Infrastructure Services – Technical Services Group Operations Anglo Irish Bank Corporation Ltd Tele: +353 1 619 1819 Mobile: +353 86 815 1188 Fax: mailto:conorlil...@angloirishbank.ie www.angloirishbank.ie P Please consider the environment before printing this e-mail. From: perl-win32-users-boun...@listserv.activestate.com [mailto:perl-win32-users-boun...@listserv.activestate.com] On Behalf Of Angelos Karageorgiou Sent: 22 September 2011 12:19 To: perl-win32-users@listserv.ActiveState.com Subject: Re: AD / ldap update Without going through your code a quick question , does the username that you are using to authenticate against AD have Administrative level privileges ? On Thu, 22 Sep 2011 12:02:21 +0100, Conor Lillis wrote: Hi all, I have a requirement to add a new primary SMTP address to our users, and retain the existing primary SMTP address as an alias. The attribute in AD that holds these values is “proxyAddresses”. -- Angelos Karageorgiou http://www.linkedin.com/in/unixgr ** Private, Confidential and Privileged. This e-mail and any files and attachments transmitted with it are confidential and/or privileged. They are intended solely for the use of the intended recipient. The content of this e-mail and any file or attachment transmitted with it may have been changed or altered without the consent of the author. If you are not the intended recipient, please note that any review, dissemination, disclosure, alteration, printing, circulation or transmission of this e-mail and/or any file or attachment transmitted with it, is prohibited and may be unlawful. This e-mail and any files and attachments transmitted with it are unencrypted unless specifically advised otherwise. If you have received this e-mail or any file or attachment transmitted with it in error please notify Anglo Irish Bank Corporation Limited, Stephen Court, 18/21 St Stephen's Green, Dublin 2, Ireland, telephone no: +353-1-6162000. Directors: A.M. Dukes Chairman, A.M.R. Aynsley (Australian) Chief Executive, N. Cawley, A. Eames, M.A. Keane, P.G. Kennedy Registered Office: Stephen Court, 18/21 St Stephen's Green, Dublin 2 Ireland Registered in Ireland: No 22045 Anglo Irish Bank Corporation Limited is regulated by the Central Bank of Ireland. Anglo Irish Bank Corporation Limited (trading as Anglo Irish Bank Private Banking) is regulated by the Central Bank of Ireland. Anglo Irish Assurance Company Limited is regulated by the Central Bank of Ireland. ** ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
AD / ldap update
Hi all, I have a requirement to add a new primary SMTP address to our users, and retain the existing primary SMTP address as an alias. The attribute in AD that holds these values is "proxyAddresses". Exchange uses any SMTP values in lowercase (eg smtp:co...@angloirishbank.ie) as aliases, and will stamp outgoing SMTP email with the value that starts with SMTP: uppercase (eg SMTP:conorlil...@angloirishbank.ie). I have attached below the script I am trying to use for proof of concept, and while I am able to retrieve the current attribute values, I am unable to successfully write the new values to AD. I should clarify that I am basing the script on previous working scripts and various articles on the web, and am not a full time coder so layout / coding is not necessarily optimum ;-) Any assistance greatly appreciated. I am testing in disabled accounts in the OU below so as not to impact on live accounts... system("cls"); use Net::LDAP; my $PDC = "PDC.domain.lan"; my $userid = "UserID\@domain.lan"; my $password = "Password"; my $newdomain = "NewDomain.com"; my $base = "ou=Disabled Accounts,ou=IOM,ou=angloirishbank,DC=anglo,DC=lan"; my $ad = Net::LDAP->new("$PDC") || die "Could not connect!"; $ad->bind(dn =>"$userid", password=>"$password") || die $^E; my @args = ( base => $base, filter => "(mail=*)", attrs => "proxyAddresses", ); my $results = $ad->search(@args); my $count = $results->count; print "Count = $count\n"; my $entry; my $counter; for (my $i=0; $i<$count; $i++) { $entry = $results->entry($i); # Get First Name and Surname for new SMTP address to be firstname.surn...@domain.com my $FirstName = ($entry->get_value('givenName')); my $SurName = ($entry->get_value('sn')); @proxyAddresses =$entry->get_value('proxyAddresses'); my $arraycount = 0; # Set all existing SMTP addresses to lowercase, Use $arraycount variable to update record within array foreach my $Proxy(@proxyAddresses) { if (grep /SMTP:/, $Proxy) { $Proxy=lc($Proxy); $proxyAddresses[$arraycount]=$Proxy; } ++$arraycount; print "$name\tOLD\t:\t$Proxy\n"; } if (!grep /SMTP:$FirstName.$SurName\@$newdomain/i, @proxyAddresses) { push(@proxyAddresses,"SMTP:$FirstName.$SurName\@$newdomain"); } # Print the new array to ensure appropriate values have been added / changed foreach my $Proxy(@proxyAddresses){print "$name\tNEW\t:\t$Proxy\n";} # Update AD (hopefully) $entry->replace('proxyAddresses',@proxyAddresses); $entry->update($ad)|| die print "There was an error updating record for $name\nError Text\t:\t".$^E; # Retrieve the updated values to validate print "\nRetrieving NEW SMTP Values\n\n\n"; my @proxyAddresses =$entry->get_value('proxyAddresses'); foreach my $Proxy(@proxyAddresses){print "$name\tADSI\t:\t$Proxy\n";} } ** Private, Confidential and Privileged. This e-mail and any files and attachments transmitted with it are confidential and/or privileged. They are intended solely for the use of the intended recipient. The content of this e-mail and any file or attachment transmitted with it may have been changed or altered without the consent of the author. If you are not the intended recipient, please note that any review, dissemination, disclosure, alteration, printing, circulation or transmission of this e-mail and/or any file or attachment transmitted with it, is prohibited and may be unlawful. This e-mail and any files and attachments transmitted with it are unencrypted unless specifically advised otherwise. If you have received this e-mail or any file or attachment transmitted with it in error please notify Anglo Irish Bank Corporation Limited, Stephen Court, 18/21 St Stephen's Green, Dublin 2, Ireland, telephone no: +353-1-6162000. Directors: A.M. Dukes Chairman, A.M.R. Aynsley (Australian) Chief Executive, N. Cawley, A. Eames, M.A. Keane, P.G. Kennedy Registered Office: Stephen Court, 18/21 St Stephen's Green, Dublin 2 Ireland Registered in Ireland: No 22045 Anglo Irish Bank Corporation Limited is regulated by the Central Bank of Ireland. Anglo Irish Bank Corporation Limited (trading as Anglo Irish Bank Private Banking) is regulated by the Central Bank of Ireland. Anglo Irish Assurance Company Limited is regulated by the Central Bank of Ireland. ** ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Re: can a regex pattern match return the starting position of the match?
Greg- This question was answered on Stack Overflow: http://stackoverflow.com/questions/87380/how-can-i-find-the-location-of-a-regex-match-in-perl <http://stackoverflow.com/questions/87380/how-can-i-find-the-location-of-a-regex-match-in-perl>brian d foy's answer seems to be the best: The built-in variables @- and @+ hold the start and end positions, respectively, of the last successful match. $-[0] and $+[0] correspond to entire pattern, while $-[N] and $+[N] correspond to the $N ($1, $2, etc.) submatches. -Conor On Thu, Apr 14, 2011 at 10:38 AM, Greg Aiken wrote: > given how smart perl is, I was thinking there must be a function within > perl whereby if one does a pattern match against a scaler, that in addition > to having regex being able to return such built in vars as: $` (what > preceeds the match), $’ (what follows the match), $1, etc… > > > > is there a built in var that returns the position within the scalar where > the match occurred? > > > > of course, if not, one may always evaluate length($`). > > > > I was just curious > > ___ > Perl-Win32-Users mailing list > Perl-Win32-Users@listserv.ActiveState.com > To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs > > ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
isue with file-find and search/replace function
HI all I have an issue where I am trying to replicate a folder structure to another server with a different root folder structure. Basically what I have is as follows: Source dir = c:\temp Dest dir = linux file system (so I need to strip the c:\temp from the SCP command I am generating) Here is the script my $dir = "c:\\temp"; chomp($dir); print "The folder name is $dir\n\n"; find(\&UploadStuff, $dir); sub UploadStuff { my $file = $_; my $currentdir = $File::Find::dir; my $currentfile = $File::Find::name; if (!-d $file) { my $scpfile = $file; print "Current Dir before stripping path\t- $currentdir\n"; $currentdir =~ s/$dir//i; print "scpfile = $scpfile\nCurrent Dir after stripping path\t- $currentdir\n"; exit; } } And output : The folder name is c:\temp Current Dir before stripping path - c:\temp/SMTPSVCLOG scpfile = smtpsvc_20100228.log Current Dir after stripping path- c:\temp/SMTPSVCLOG ** Private, Confidential and Privileged. This e-mail and any files and attachments transmitted with it are confidential and/or privileged. They are intended solely for the use of the intended recipient. The content of this e-mail and any file or attachment transmitted with it may have been changed or altered without the consent of the author. If you are not the intended recipient, please note that any review, dissemination, disclosure, alteration, printing, circulation or transmission of this e-mail and/or any file or attachment transmitted with it, is prohibited and may be unlawful. This e-mail and any files and attachments transmitted with it are unencrypted unless specifically advised otherwise. If you have received this e-mail or any file or attachment transmitted with it in error please notify Anglo Irish Bank Corporation Limited, Stephen Court, 18/21 St Stephen's Green, Dublin 2, Ireland, telephone no: +353-1-6162000. Directors: A.M. Dukes Chairman, A.M.R. Aynsley (Australian) Chief Executive, N. Cawley, A. Eames, M.A. Keane, P.G. Kennedy Registered Office: Stephen Court, 18/21 St Stephen's Green, Dublin 2 Ireland Registered in Ireland: No 22045 Anglo Irish Bank Corporation Limited is regulated by the Central Bank of Ireland. Anglo Irish Bank Corporation Limited (trading as Anglo Irish Bank Private Banking) is regulated by the Central Bank of Ireland. Anglo Irish Assurance Company Limited is regulated by the Central Bank of Ireland. ** ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
RE: Advice requested, porting unix perl app to windows
`www.openssh.org has a free ssh server for Windows, this will solve your problem I think and require minimal code change Regards, Conor Lillis --- Senior Systems Administrator, Group Network Services, tel : +353-1-616-2540 Anglo Irish Bank www.angloirishbank.ie --- -Original Message- From: perl-win32-users-boun...@listserv.activestate.com [mailto:perl-win32-users-boun...@listserv.activestate.com] On Behalf Of Dennis Daupert Sent: 03 June 2009 16:01 To: Tobias Hoellrich Cc: perl-win32-users@listserv.ActiveState.com Subject: RE: Advice requested, porting unix perl app to windows Tobias: > Dennis - there's a Net::SFTP module ( http://cpan.uwinnipeg.ca/dist/Net-SFTP), > which is a pure-perl implementation of the SFTP protocol. The bottom > of the page > also seems to suggest that various Windows PPM packages are available > for it. Hi Tobias, Thanks for the information. The problem we've run into using sftp is that we need to have an sftp server running on the target machine. Management are keen on saving money, but also have the fixated paradigm that server products have to be cost money, i.e., have some company behind them for support. There is allowance made for in-house code (a la Perl), so if there is a way of using windows natively for file-transfer operations by way of Perl code, that would be optimal. best, /dennis Dennis Daupert, PhD Senior Systems Development Professional -- CSC Account CSC GOS | o: 1.317.298.9499 | ddaup...@csc.com | www.csc.com This is a PRIVATE message. If you are not the intended recipient, please delete without copying and kindly advise us by e-mail of the mistake in delivery. NOTE: Regardless of content, this e-mail shall not operate to bind CSC to any order or other contract unless pursuant to explicit written agreement or government initiative expressly permitting the use of e-mail for such purpose. ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs ** Private, Confidential and Privileged. This e-mail and any files and attachments transmitted with it are confidential and/or privileged. They are intended solely for the use of the intended recipient. The content of this e-mail and any file or attachment transmitted with it may have been changed or altered without the consent of the author. If you are not the intended recipient, please note that any review, dissemination, disclosure, alteration, printing, circulation or transmission of this e-mail and/or any file or attachment transmitted with it, is prohibited and may be unlawful. If you have received this e-mail or any file or attachment transmitted with it in error please notify Anglo Irish Bank Corporation Limited, Stephen Court, 18/21 St Stephen's Green, Dublin 2, Ireland, telephone no: +353-1-6162000. Directors: D O'Connor (Chairman), F Daly, A Dukes, M Keane, D Quilligan. Registered Office: Stephen Court, 18/21 St Stephen's Green, Dublin 2 Ireland Registered in Ireland: No 22045 Anglo Irish Bank Corporation Limited is regulated by the Financial Regulator. Anglo Irish Bank Corporation Limited (trading as Anglo Irish Bank Private Banking) is regulated by the Financial Regulator. Anglo Irish Assurance Company Limited is regulated by the Financial Regulator. ** ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
RE: $ENV{'temp'} returns result in dos 8.3 format
Hi Greg, if you type set at the command line what value do you get returned for the env variable "temp" ? It may be set to the 8.3 format , particularly if someone had to manually set it to be this value. I have had to do this previously where installation kits could not work off the "c:\documents and setting\.." setting for %temp% due to not dealing correctly with the spaces in the returned text. Hope this helps... Regards, Conor Lillis --- Senior Systems Administrator, Group Network Services, tel : +353-1-616-2540 Anglo Irish Bank www.angloirishbank.ie <http://www.angloirishbank.ie/> --- From: perl-win32-users-boun...@listserv.activestate.com [mailto:perl-win32-users-boun...@listserv.activestate.com] On Behalf Of Tobias Hoellrich Sent: 14 April 2009 00:50 To: gai...@visioninfosoft.com Cc: perl-win32-users@listserv.activestate.com Subject: RE: $ENV{'temp'} returns result in dos 8.3 format Take a look at "perldoc Win32" and specifically Win32::GetFullPathName. No idea if it'll help in your case, but it's worth a try. Cheers - T From: perl-win32-users-boun...@listserv.activestate.com [mailto:perl-win32-users-boun...@listserv.activestate.com] On Behalf Of Greg Aiken Sent: Monday, April 13, 2009 5:33 PM To: perl-win32-users@listserv.activestate.com Subject: $ENV{'temp'} returns result in dos 8.3 format $eight_dot_three = $ENV{'temp'}; #on my system return value is 8.3 truncated directory paths question 1: is there some setting in the registry that controls how env var paths are to be stored and returned? specifically in the old 8.3 truncated ~ version, or the newer win32 full paths? if I can fix this by making a system wide change, this would be preferred... question 2: if there is not a setting in the registry that controls this behavior (or if no one is able to direct me to the proper registry based answer). is there some alternative Perl way to convert the 8.3 path to the full non truncated path value... as in $full_nontruncated_path = &magical_function($eight_dot_three); thanks for your insights... greg ** Private, Confidential and Privileged. This e-mail and any files and attachments transmitted with it are confidential and/or privileged. They are intended solely for the use of the intended recipient. The content of this e-mail and any file or attachment transmitted with it may have been changed or altered without the consent of the author. If you are not the intended recipient, please note that any review, dissemination, disclosure, alteration, printing, circulation or transmission of this e-mail and/or any file or attachment transmitted with it, is prohibited and may be unlawful. If you have received this e-mail or any file or attachment transmitted with it in error please notify Anglo Irish Bank Corporation Limited, Stephen Court, 18/21 St Stephen's Green, Dublin 2, Ireland, telephone no: +353-1-6162000. Directors: D O'Connor (Chairman), F Daly, A Dukes, M Keane, D Quilligan. Registered Office: Stephen Court, 18/21 St Stephen's Green, Dublin 2 Ireland Registered in Ireland: No 22045 Anglo Irish Bank Corporation Limited is regulated by the Financial Regulator. Anglo Irish Bank Corporation Limited (trading as Anglo Irish Bank Private Banking) is regulated by the Financial Regulator. Anglo Irish Assurance Company Limited is regulated by the Financial Regulator. ** ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
PPM issue
Hi guys I have an issue below on running PPM on any packages, has anyone encountered this issue before or do they have a workaround? D:\Admin\Scripts>ppm install net-dns Install 'Net-IP' version 1.25 in ActivePerl 5.8.7.815. Couldn't read chunk at offset unknown at C:/perl/site/lib/PPM/Archive/Tar.pm line 25 Error: Can't call method "is_label" on an undefined value at C:/perl/site/lib/Archive/Tar.pm line 282. Regards, Conor Lillis --- Senior Systems Administrator, Group Network Services, tel : +353-1-616-2540 Anglo Irish Bank www.angloirishbank.ie --- ** Private, Confidential and Privileged. This e-mail and any files and attachments transmitted with it are confidential and/or privileged. They are intended solely for the use of the intended recipient. The content of this e-mail and any file or attachment transmitted with it may have been changed or altered without the consent of the author. If you are not the intended recipient, please note that any review, dissemination, disclosure, alteration, printing, circulation or transmission of this e-mail and/or any file or attachment transmitted with it, is prohibited and may be unlawful. If you have received this e-mail or any file or attachment transmitted with it in error please notify Anglo Irish Bank Corporation Plc, Stephen Court, 18/21 St Stephen's Green, Dublin 2, Ireland, telephone no: +353-1-6162000. Directors: S P FitzPatrick (Chairman), D Drumm (Chief Executive), L Bradshaw, D O'Connor, A Heraty, M D Jacob, W A McAteer, G McGann, D Quilligan, N Sullivan, P Whelan, N Harwerth ( U.S.) Registered Office: Stephen Court, 18/21 St Stephen's Green, Dublin 2 Ireland Registered in Ireland: No 22045 Anglo Irish Bank Corporation plc is regulated by the Financial Regulator. Anglo Irish Bank Corporation plc (trading as Anglo Irish Bank Private Banking) is regulated by the Financial Regulator. Anglo Irish Assurance Company Limited is regulated by the Financial Regulator. ** ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
PPM failures, help pls.
Hi, When I try and download modules using the interactive PPM client, I get the error below:- "ERROR: Can't extract files from C:\temp\ppm-nSFdSn/Archive-Zip-1.23.tgz" Can anyone help and tell me what I am missing, I guess it is something local not installed not facilitating the unzip/untar to function All help appreciated. Regards, Conor Lillis --- Senior Systems Administrator, Group Network Services, tel : +353-1-616-2540 Anglo Irish Bank www.angloirishbank.ie --- ** Private, Confidential and Privileged. This e-mail and any files and attachments transmitted with it are confidential and/or privileged. They are intended solely for the use of the intended recipient. The content of this e-mail and any file or attachment transmitted with it may have been changed or altered without the consent of the author. If you are not the intended recipient, please note that any review, dissemination, disclosure, alteration, printing, circulation or transmission of this e-mail and/or any file or attachment transmitted with it, is prohibited and may be unlawful. If you have received this e-mail or any file or attachment transmitted with it in error please notify Anglo Irish Bank Corporation Plc, Stephen Court, 18/21 St Stephen's Green, Dublin 2, Ireland, telephone no: +353-1-6162000. Directors: S P FitzPatrick (Chairman), D Drumm (Chief Executive), L Bradshaw, D O'Connor, A Heraty, M D Jacob, W A McAteer, G McGann, D Quilligan, N Sullivan, P Whelan, N Harwerth ( U.S.) Registered Office: Stephen Court, 18/21 St Stephen's Green, Dublin 2 Ireland Registered in Ireland: No 22045 Anglo Irish Bank Corporation plc is regulated by the Financial Regulator. Anglo Irish Bank Corporation plc (trading as Anglo Irish Bank Private Banking) is regulated by the Financial Regulator. Anglo Irish Assurance Company Limited is regulated by the Financial Regulator. ** ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
RE: Reading 'Little Endian - UCS-2' text to perl
I would guess (without checking I have to say) that there is NULL padding between chars - notepad deals with these automatically. this will strip your NULLs $inputline =~ s/\0//ig; -- Conor Lillis -- Systems Administrator, Infrastructure, Davy 49 Dawson St., Dublin 2. Ireland http://www.davy.ie <http://www.davy.ie/> Direct : +353 1 614 90 13 Switch : +353 1 672 42 00 FAX : + 353 1 679 6334 -- _ From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of eyal edri Sent: 15 February 2007 00:35 To: perl-win32-users@listserv.activestate.com Subject: Reading 'Little Endian - UCS-2' text to perl Hello, I'm having difficulties reading a log file from ADMT using ordinary perl 5.8.7 open command. After opening the file (apparently in "little endian" format, according to my notepad++) i'm printed it and i get spaces everywhere (space between each char!). when i convert the file to UTF8 (again, manually with my notepad++) it prints out file just fine. anyone knows how to handle this encoding in perl, or how can i convert it to UTF8? thanks, -- Eyal Edri *** The information in this e-mail is confidential and may be legally privileged. It is intended solely for the addressee. Access to this e-mail by anyone else is unauthorised. If you are not the intended recipient, you are notified that any disclosing, copying, distributing or taking any action in reliance on the contents of this information is strictly prohibited. Any views, opinions or advice contained in this e-mail are those of the sending individual and not necessarily those of the firm. It is possible for data transmitted by e-mail to be deliberately or accidentally corrupted or intercepted. For this reason where the communication is by e-mail, J&E Davy does not accept any responsibility for any breach of confidence which may arise from the use of this medium. If you have received this e-mail in error please notify us immediately at mailto: [EMAIL PROTECTED] and delete this e-mail from your system ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
a script with input timeout (amended)
Hi all, I have a script running on Windows 2003 taking input from the command line to filter a list the script runs against, which is all working fine, however, I would like to set a timer so that if there is no input after say 10 secs it will go on and run the script against all elements in the list. Summary of my perl5 (revision 5 version 8 subversion 8) configuration:Platform:osname=MSWin32, osvers=5.0, archname=MSWin32-x86-multi-thread thanks Conor --Conor Lillis--Systems Administrator,Infrastructure,Davy49 Dawson St.,Dublin 2. Ireland http://www.davy.ieDirect : +353 1 614 90 13Switch : +353 1 672 42 00FAX : + 353 1 679 6334-- *** The information in this e-mail is confidential and may be legally privileged. It is intended solely for the addressee. Access to this e-mail by anyone else is unauthorised. If you are not the intended recipient, you are notified that any disclosing, copying, distributing or taking any action in reliance on the contents of this information is strictly prohibited. Any views, opinions or advice contained in this e-mail are those of the sending individual and not necessarily those of the firm. It is possible for data transmitted by e-mail to be deliberately or accidentally corrupted or intercepted. For this reason where the communication is by e-mail, J&E Davy does not accept any responsibility for any breach of confidence which may arise from the use of this medium. If you have received this e-mail in error please notify us immediately at mailto: [EMAIL PROTECTED] and delete this e-mail from your system ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
[no subject]
Hi all, I have a script taking input from the command line to filter the list the script runs against, which is all working fine, however, I would like to set a timer so that if there is no input after say 10 secs it will go on and run the script against all elements in the list. thanks Conor --Conor Lillis--Systems Administrator,Infrastructure,Davy49 Dawson St.,Dublin 2. Ireland http://www.davy.ieDirect : +353 1 614 90 13Switch : +353 1 672 42 00FAX : + 353 1 679 6334-- *** The information in this e-mail is confidential and may be legally privileged. It is intended solely for the addressee. Access to this e-mail by anyone else is unauthorised. If you are not the intended recipient, you are notified that any disclosing, copying, distributing or taking any action in reliance on the contents of this information is strictly prohibited. Any views, opinions or advice contained in this e-mail are those of the sending individual and not necessarily those of the firm. It is possible for data transmitted by e-mail to be deliberately or accidentally corrupted or intercepted. For this reason where the communication is by e-mail, J&E Davy does not accept any responsibility for any breach of confidence which may arise from the use of this medium. If you have received this e-mail in error please notify us immediately at mailto: [EMAIL PROTECTED] and delete this e-mail from your system ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
HTTP synch
Title: HTTP synch Hi, I have a script that uses shells to run a wget command, in order to synch a web site with a local folder. The web site is the source and the local folder is the destination. Currently it just blindly copies the website down to the local folder without performing any checks. However, I would like to modify the functionality to verify the local files and the server files are the same size, to reduce traffic during the transfer process and the duration of the script. My connection to the web server is fast, but there are several (~100) GB of data to be synched.. Anyone have any ideas ? regards, Conor The information in this e-mail is confidential and may be legally privileged. It is intended solely for the addressee. Access to this e-mail by anyone else is unauthorised. If you are not the intended recipient, any disclosure, copying, distribution or any other action taken or any views, opinions or advice contained in this e-mail are those of the sending individual and not necessarily those of the firm. It is possible for data transmitted by e-mail to be deliberately or accidentally corrupted or intercepted. For this reason where the communication is by e-mail, J&E Davy does not accept any responsibility for any breach of confidence which may arise from the use of this medium. If you have received this e-mail in error please notify us immediately at mailto:[EMAIL PROTECTED] and delete this e-mail from your system. ___ Perl-Win32-Admin mailing list Perl-Win32-Admin@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
RE: HTTP synch
Title: RE: HTTP synch Thanks to all who suggested the wget -m option, it is just the ticket ! Must read the man file more closely in future Must read the man file more closely in future Must read the man file more closely in future.. -Original Message- From: Darryl Ross [mailto:[EMAIL PROTECTED]] Sent: 22 February 2005 13:20 To: Conor Lillis Cc: Perl List (E-mail); PERL Win32 Users (E-mail); Perl-Unix-Users (E-mail); Perl-Win32-Admin (E-mail) Subject: Re: HTTP synch -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Conor Lillis wrote: | Hi, | I have a script that uses shells to run a wget command, in order to | synch a web site with a local folder. The web site is the source and the | local folder is the destination. | | Currently it just blindly copies the website down to the local folder | without performing any checks. However, I would like to modify the | functionality to verify the local files and the server files are the | same size, to reduce traffic during the transfer process and the | duration of the script. | | My connection to the web server is fast, but there are several (~100) GB | of data to be synched.. | Anyone have any ideas ? man wget Check out the '-m' switch. Regards Darryl -BEGIN PGP SIGNATURE- Version: GnuPG v1.2.1 (MingW32) iD8DBQFCGzF3/XQ6DbmPjokRAqvPAJ4plNuif0ogISoLPJHLJx6/wNl3AgCeNbsN j916Ls3En5B4UjNw7s1iAr0= =Bf5K -END PGP SIGNATURE- The information in this e-mail is confidential and may be legally privileged. It is intended solely for the addressee. Access to this e-mail by anyone else is unauthorised. If you are not the intended recipient, any disclosure, copying, distribution or any other action taken or any views, opinions or advice contained in this e-mail are those of the sending individual and not necessarily those of the firm. It is possible for data transmitted by e-mail to be deliberately or accidentally corrupted or intercepted. For this reason where the communication is by e-mail, J&E Davy does not accept any responsibility for any breach of confidence which may arise from the use of this medium. If you have received this e-mail in error please notify us immediately at mailto:[EMAIL PROTECTED] and delete this e-mail from your system. ___ Perl-Win32-Admin mailing list Perl-Win32-Admin@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Active Directory management
Title: Active Directory management Hi, This has probably been asked previously so apologies in advance. We are moving (finally) from an NT4 domain structure to a Win2k3 Active Directory. I had a significant number of scripts developed for NT4 for such functions as user and group management, server / service / disk / cpu / mem / account lockout monitoring etc. Can anyone recommend a good PERL resource (book / site) for concise introduction on how to do the user/group /OU management side of things on AD ? TIA, Conor The information in this e-mail is confidential and may be legally privileged. It is intended solely for the addressee. Access to this e-mail by anyone else is unauthorised. If you are not the intended recipient, any disclosure, copying, distribution or any other action taken or any views, opinions or advice contained in this e-mail are those of the sending individual and not necessarily those of the firm. It is possible for data transmitted by e-mail to be deliberately or accidentally corrupted or intercepted. For this reason where the communication is by e-mail, J&E Davy does not accept any responsibility for any breach of confidence which may arise from the use of this medium. If you have received this e-mail in error please notify us immediately at mailto:[EMAIL PROTECTED] and delete this e-mail from your system. ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
RE: system("rmdir...") not working like it once did
Title: RE: system("rmdir...") not working like it once did I had the same issue and tracked it down to multiple versions of rmdir on my PC. The one in the path wasn't necessarily the one that PERL was trying to use. Once I explicitly set it to use d:\utils\rmdir (or whatever) things were OK again.. I had also patched recently, maybe this is the cause ? regards, Conor -- Conor Lillis -- Systems Administrator, Infrastructure, Davy 49 Dawson St., Dublin 2. http://www.davy.ie Direct : +353 1 614 90 13 Switch : +353 1 672 42 00 FAX : + 353 1 679 6334 -- -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] On Behalf Of Sisyphus Sent: 06 September 2005 13:20 To: perl-win32-users Subject: system("rmdir...") not working like it once did Hi, Can anyone make sense of this: D:\math-mpfr\build58\cpan>type try.pl use warnings; if(system("rmdir /S /Q Math-MPFR-1.07\\t")) {die "Failure"} D:\math-mpfr\build58\cpan>perl try.pl rmdir: `/S': No such file or directory rmdir: `/Q': No such file or directory rmdir: `Math-MPFR-1.07\\t': Directory not empty Failure at try.pl line 3. D:\math-mpfr\build58\cpan>rmdir /S /Q Math-MPFR-1.07\t D:\math-mpfr\build58\cpan> Three things I do not understand: 1) I have run try.pl as part of an automated procedure on the same machine, in the same shell, probably about 20 times in the past. Tonight is the first time it has decided to behave in a manner other than I expected; 2) Why perl has suddenly decided that a backslash inside double quotes in a system() command no longer represents an escape; 3) Why rmdir in the system command thinks that /S and /Q are folders, yet understands them perfectly when run from the command line. Two things have changed since I last ran this script: 1) I've switched from perl5.8.6 to perl5.8.7 - but that's not the problem, because when I revert to 5.8.6 the same behaviour persists. 2) I've run Windows Update a coupla times. I'm also open to suggestions on how I might successfully run 'rmdir /S /Q Math-MPFR-1.07\t' as a system() command from perl. I tried the following (both of which produced the same nonsensical result as appears above): use warnings; $command = 'rmdir /S /Q Math-MPFR-1.07\\t'; if(system($command)) {die "Failure"} use warnings; @command = ('rmdir', '/S', '/Q', 'Math-MPFR-1.07\\t'); if(system(@command)) {die "Failure"} I'm on Windows2000. Aaah ... I've just now found a solution. If I change 'rmdir' to 'rd' it works fine - but I'll send this post anyway ... it might save someone else some agony. And I'm still completely in the dark as regards what's going on ... any explanations gratefully received. Btw, here's what 'rmdir /?' reveals for me: D:\math-mpfr>rmdir /? Removes (deletes) a directory. RMDIR [/S] [/Q] [drive:]path RD [/S] [/Q] [drive:]path /S Removes all directories and files in the specified directory in addition to the directory itself. Used to remove a directory tree. /Q Quiet mode, do not ask if ok to remove a directory tree with /S Cheers, Rob ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs The information in this e-mail is confidential and may be legally privileged. It is intended solely for the addressee. Access to this e-mail by anyone else is unauthorised. If you are not the intended recipient, any disclosure, copying, distribution or any other action taken or any views, opinions or advice contained in this e-mail are those of the sending individual and not necessarily those of the firm. It is possible for data transmitted by e-mail to be deliberately or accidentally corrupted or intercepted. For this reason where the communication is by e-mail, J&E Davy does not accept any responsibility for any breach of confidence which may arise from the use of this medium. If you have received this e-mail in error please notify us immediately at mailto:[EMAIL PROTECTED] and delete this e-mail from your system. ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
RE: counting lines in a text files
Title: RE: counting lines in a text files use open IN => ":raw"; I find this works well for files that have occasional control chars in them. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] On Behalf Of Eric Vercelletto Sent: 23 June 2005 09:38 To: perl-win32-users@listserv.ActiveState.com Subject: counting lines in a text files Hi folks, although the answer seems simple, I have a strange phenomenon while reading a text file, where I want to identify each line by its linenumber obviously first reflex is to use $. or at each iteration of foreach $line ( ) $linenumber++ ; this work in the majority of the lines but it seems some lines are not read by the foreach , and I suspect them to be lines only containing a \n I have also seen lines ending with \x0d\n but this does not seem to count for 2 lines though I will provide a test case during the day, but does anyone have an idea of what can happen ? thanks Eric ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs The information in this e-mail is confidential and may be legally privileged. It is intended solely for the addressee. Access to this e-mail by anyone else is unauthorised. If you are not the intended recipient, any disclosure, copying, distribution or any other action taken or any views, opinions or advice contained in this e-mail are those of the sending individual and not necessarily those of the firm. It is possible for data transmitted by e-mail to be deliberately or accidentally corrupted or intercepted. For this reason where the communication is by e-mail, J&E Davy does not accept any responsibility for any breach of confidence which may arise from the use of this medium. If you have received this e-mail in error please notify us immediately at mailto:[EMAIL PROTECTED] and delete this e-mail from your system. ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
RE: Finding the number of CPUs on a windows 2003 terminal server
Title: RE: Finding the number of CPUs on a windows 2003 terminal server mess with this it will give all you want and more ;-) http://www.roth.net/perl/scripts/scripts.asp?SrvCpuMem.pl -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Sandhu, Suchindra Sent: 25 April 2005 14:45 To: perl-win32-users@listserv.ActiveState.com Subject: Finding the number of CPUs on a windows 2003 terminal server hello, Is there a way to find the number of CPUs on a windows 2003 terminal server from command line or a perl program? I tried googling it, but it did not help at all. Thanks, -- /s ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs The information in this e-mail is confidential and may be legally privileged. It is intended solely for the addressee. Access to this e-mail by anyone else is unauthorised. If you are not the intended recipient, any disclosure, copying, distribution or any other action taken or any views, opinions or advice contained in this e-mail are those of the sending individual and not necessarily those of the firm. It is possible for data transmitted by e-mail to be deliberately or accidentally corrupted or intercepted. For this reason where the communication is by e-mail, J&E Davy does not accept any responsibility for any breach of confidence which may arise from the use of this medium. If you have received this e-mail in error please notify us immediately at mailto:[EMAIL PROTECTED] and delete this e-mail from your system. ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
RE: HTTP synch
Title: RE: HTTP synch Thanks to all who suggested the wget -m option, it is just the ticket ! Must read the man file more closely in future Must read the man file more closely in future Must read the man file more closely in future.. -Original Message- From: Darryl Ross [mailto:[EMAIL PROTECTED]] Sent: 22 February 2005 13:20 To: Conor Lillis Cc: Perl List (E-mail); PERL Win32 Users (E-mail); Perl-Unix-Users (E-mail); Perl-Win32-Admin (E-mail) Subject: Re: HTTP synch -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Conor Lillis wrote: | Hi, | I have a script that uses shells to run a wget command, in order to | synch a web site with a local folder. The web site is the source and the | local folder is the destination. | | Currently it just blindly copies the website down to the local folder | without performing any checks. However, I would like to modify the | functionality to verify the local files and the server files are the | same size, to reduce traffic during the transfer process and the | duration of the script. | | My connection to the web server is fast, but there are several (~100) GB | of data to be synched.. | Anyone have any ideas ? man wget Check out the '-m' switch. Regards Darryl -BEGIN PGP SIGNATURE- Version: GnuPG v1.2.1 (MingW32) iD8DBQFCGzF3/XQ6DbmPjokRAqvPAJ4plNuif0ogISoLPJHLJx6/wNl3AgCeNbsN j916Ls3En5B4UjNw7s1iAr0= =Bf5K -END PGP SIGNATURE- The information in this e-mail is confidential and may be legally privileged. It is intended solely for the addressee. Access to this e-mail by anyone else is unauthorised. If you are not the intended recipient, any disclosure, copying, distribution or any other action taken or any views, opinions or advice contained in this e-mail are those of the sending individual and not necessarily those of the firm. It is possible for data transmitted by e-mail to be deliberately or accidentally corrupted or intercepted. For this reason where the communication is by e-mail, J&E Davy does not accept any responsibility for any breach of confidence which may arise from the use of this medium. If you have received this e-mail in error please notify us immediately at mailto:[EMAIL PROTECTED] and delete this e-mail from your system. ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
HTTP synch
Title: HTTP synch Hi, I have a script that uses shells to run a wget command, in order to synch a web site with a local folder. The web site is the source and the local folder is the destination. Currently it just blindly copies the website down to the local folder without performing any checks. However, I would like to modify the functionality to verify the local files and the server files are the same size, to reduce traffic during the transfer process and the duration of the script. My connection to the web server is fast, but there are several (~100) GB of data to be synched.. Anyone have any ideas ? regards, Conor The information in this e-mail is confidential and may be legally privileged. It is intended solely for the addressee. Access to this e-mail by anyone else is unauthorised. If you are not the intended recipient, any disclosure, copying, distribution or any other action taken or any views, opinions or advice contained in this e-mail are those of the sending individual and not necessarily those of the firm. It is possible for data transmitted by e-mail to be deliberately or accidentally corrupted or intercepted. For this reason where the communication is by e-mail, J&E Davy does not accept any responsibility for any breach of confidence which may arise from the use of this medium. If you have received this e-mail in error please notify us immediately at mailto:[EMAIL PROTECTED] and delete this e-mail from your system. ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
[Perl-unix-users] RE: FTP Question
Title: FTP Question issue resolved, when FTPing in biinary mode, and viewing the output in a command window, the chars were "wrong", in the actual file FTPed with binary mode switched on, they are what I was expecting. Hope I didnt waste anyone's time worrying over that one. -- -Original Message-From: Conor Lillis [mailto:[EMAIL PROTECTED]Sent: 03 December 2004 12:48To: [EMAIL PROTECTED]; Perl-Unix-Users (E-mail)Subject: FTP Question Hi, I have an issue with a file I am transferring using FTP. It contains some unusual Irish language chars, such as "PADRAIC Ó MáILLE", this appears in my target file as "PADRAIC Ë MßILLE". I am using NET::FTP to transfer the file, if anyone can offer insight on codepages or whatever might be causing this issueit would be much appreciated. thanks, Conor The information in this e-mail is confidential and may be legally privileged. It is intended solely for the addressee. Access to this e-mail by anyone else is unauthorised. If you are not the intended recipient, any disclosure, copying, distribution or any other action taken or any views, opinions or advice contained in this e-mail are those of the sending individual and not necessarily those of the firm. It is possible for data transmitted by e-mail to be deliberately or accidentally corrupted or intercepted. For this reason where the communication is by e-mail, J&E Davy does not accept any responsibility for any breach of confidence which may arise from the use of this medium. If you have received this e-mail in error please notify us immediately at mailto:[EMAIL PROTECTED] and delete this e-mail from your system. The information in this e-mail is confidential and may be legally privileged. It is intended solely for the addressee. Access to this e-mail by anyone else is unauthorised. If you are not the intended recipient, any disclosure, copying, distribution or any other action taken or any views, opinions or advice contained in this e-mail are those of the sending individual and not necessarily those of the firm. It is possible for data transmitted by e-mail to be deliberately or accidentally corrupted or intercepted. For this reason where the communication is by e-mail, J&E Davy does not accept any responsibility for any breach of confidence which may arise from the use of this medium. If you have received this e-mail in error please notify us immediately at mailto:[EMAIL PROTECTED] and delete this e-mail from your system. ___ Perl-Unix-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
FTP Question
Title: FTP Question Hi, I have an issue with a file I am transferring using FTP. It contains some unusual Irish language chars, such as "PADRAIC Ó MáILLE", this appears in my target file as "PADRAIC Ë MßILLE". I am using NET::FTP to transfer the file, if anyone can offer insight on codepages or whatever might be causing this issueit would be much appreciated. thanks, Conor The information in this e-mail is confidential and may be legally privileged. It is intended solely for the addressee. Access to this e-mail by anyone else is unauthorised. If you are not the intended recipient, any disclosure, copying, distribution or any other action taken or any views, opinions or advice contained in this e-mail are those of the sending individual and not necessarily those of the firm. It is possible for data transmitted by e-mail to be deliberately or accidentally corrupted or intercepted. For this reason where the communication is by e-mail, J&E Davy does not accept any responsibility for any breach of confidence which may arise from the use of this medium. If you have received this e-mail in error please notify us immediately at mailto:[EMAIL PROTECTED] and delete this e-mail from your system. ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Folder manipulation (Win32)
Title: Folder manipulation (Win32) Hi, I have a script that works on certain file types that it finds in the current folder, however what I require is that it will loop through the current folder and all subfolders beneath it. What is the most efficient way to do this ? thanks conor The information in this e-mail is confidential and may be legally privileged. It is intended solely for the addressee. Access to this e-mail by anyone else is unauthorised. If you are not the intended recipient, any disclosure, copying, distribution or any other action taken or any views, opinions or advice contained in this e-mail are those of the sending individual and not necessarily those of the firm. It is possible for data transmitted by e-mail to be deliberately or accidentally corrupted or intercepted. For this reason where the communication is by e-mail, J&E Davy does not accept any responsibility for any breach of confidence which may arise from the use of this medium. If you have received this e-mail in error please notify us immediately at mailto:[EMAIL PROTECTED] and delete this e-mail from your system. ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
RE: script to enumerate window services
This will list all services, and email them to you. -Original Message- From: Brown, Bobby (US - Hermitage) [mailto:[EMAIL PROTECTED] Sent: 09 September 2003 16:24 To: 'Leon'; perl; Yahoo Beginner Perl; win32 Subject: RE: script to enumerate window services Various scripts here I use to gather information from remote servers Bobby -Original Message- From: Leon [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 09, 2003 8:53 AM To: perl; Yahoo Beginner Perl; win32 Subject: script to enumerate window services Hi everyone, Does anyone know how I could go about writing a script to find all the services running on a remote windows 2000 server (actually I need to go through about 200 servers looking for a particular service but if you guys can just help get me started I can write the logic to loop through all 200 and check for the service once i Have it.) I tried to cheat :( and use scriptomatic but i was surprised to find there is not a wmi class for services??? Is there one am I missing it? Can anyone give me a helpful push in the right direction? Does anyone have any sample code I could look at? Thx in advance, Leon (scripting newbie) __ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs This message (including any attachments) contains confidential information intended for a specific individual and purpose, and is protected by law. If you are not the intended recipient, you should delete this message. Any disclosure, copying, or distribution of this message, or the taking of any action based on it, is strictly prohibited. ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs The information in this email is confidential and may be legally privileged. It is intended solely for the addressee. Access to this email by anyone else is unauthorised.if you are not the intended recipient, any disclosure, copying, distribution, or any action taken or omitted to be taken in reliance on it is prohibited and may be unlawful. Please note that any views, opinions or advice contained in this email are those of the sending individual and not necessarily those of the firm. It is possible for data transmitted by e-mail to be deliberately or accidentally corrupted or intercepted. For this reason, where the communication is by e-mail, J&E Davy does not accept any responsibility for any breach of confidence which may arise from the use of this medium. If you have received this e-mail in error please notify us immediately at mailto:[EMAIL PROTECTED] and delete this e-mail from your system. Services-list-all-PCs.PL Description: Binary data
RE: remote execn on win nt machines for their info
Title: RE: remote execn on win nt machines for their info Also, SSH (www.openssh.org) is extremely useful. -Original Message- From: Tillman, James [mailto:[EMAIL PROTECTED]] Sent: 03 February 2003 12:06 To: 'PRADEEP GOEL'; [EMAIL PROTECTED] Subject: RE: remote execn on win nt machines for their info > -Original Message- > From: PRADEEP GOEL [mailto:[EMAIL PROTECTED]] > Sent: Monday, February 03, 2003 5:42 AM > To: [EMAIL PROTECTED] > Subject: remote execn on win nt machines for their info > > > Hi All > > Does anybody knows how to use perl or other script > for remote execn on nt machines to get some info of machines > , may be say > from > registery , etc . > Some options: * The Win32:: family of modules, many of which provide remote admin and monitoring capabilities. See www.roth.net and the main ActiveState distro * Win32::OLE - You can use Windows Management Instrumentation (WMI) or Active Directory Services Interface (ADSI) to get a lot of computer information. See msdn.microsoft.com for more on these. * When all else fails, you can use psexec.exe from www.sysinternals.com (allows you to remotely execute processes on other machines). Hope this helps... jpt ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs The information in this email is confidential and may be legally privileged. It is intended solely for the addressee. Access to this email by anyone else is unauthorised.if you are not the intended recipient, any disclosure, copying, distribution, or any action taken or omitted to be taken in reliance on it is prohibited and may be unlawful. Please note that any views, opinions or advice contained in this email are those of the sending individual and not necessarily those of the firm. It is possible for data transmitted by e-mail to be deliberately or accidentally corrupted or intercepted. For this reason, where the communication is by e-mail, J&E Davy does not accept any responsibility for any breach of confidence which may arise from the use of this medium. If you have received this e-mail in error please notify us immediately at mailto:[EMAIL PROTECTED] and delete this e-mail from your system.
RE: :Telnet on Win2K
please read the unsubscribe info on the bottom of the email, thanks. -Original Message-From: tran bao toan [mailto:[EMAIL PROTECTED]]Sent: 28 November 2002 10:53To: [EMAIL PROTECTED]Cc: [EMAIL PROTECTED]Subject: RE: :Telnet on Win2K please do not send me mail again. thanks [EMAIL PROTECTED] wrote: On 28/11/2002 03:23:01 perl-win32-users-admin wrote:>I think no one has got this to work yet because none of us has banged our>head hard enough onto the desk top.>>And all this just to remotely power down a Win2K box.:)>I'll post what I come up with.>use Win32;Win32::InitiateSystemShutdown( MACHINE, MESSAGE, TIMEOUT, FORCECLOSE,REBOOT );--Csaba Ráduly, Software Engineer Sophos Anti-Virusemail: [EMAIL PROTECTED] http://www.sophos.comUS Support: +1 888 SOPHOS 9 UK Support: +44 1235 559933___Perl-Win32-Users mailing list[EMAIL PROTECTED]To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs Do you Yahoo!?Yahoo! Mail Plus - Powerful. Affordable. Sign up now The information in this email is confidential and may be legally privileged. It is intended solely for the addressee. Access to this email by anyone else is unauthorised.if you are not the intended recipient, any disclosure, copying, distribution, or any action taken or omitted to be taken in reliance on it is prohibited and may be unlawful. Please note that any views, opinions or advice contained in this email are those of the sending individual and not necessarily those of the firm. It is possible for data transmitted by e-mail to be deliberately or accidentally corrupted or intercepted. For this reason, where the communication is by e-mail, J&E Davy does not accept any responsibility for any breach of confidence which may arise from the use of this medium. If you have received this e-mail in error please notify us immediately at mailto:[EMAIL PROTECTED] and delete this e-mail from your system.
RE: [PMX:#] Date substract problem
This will do it for you :- use Time::Local; $today = timelocal(localtime); @yesterday = localtime($today - (24 * 60 * 60)); my ($mday,$mon,$year) = (@yesterday)[3..5]; $mon=++$mon; if ($mon < 10){$mon="0$mon";} if ($mday < 10){$mday="0$mday";} $year=$year+1900; $filename="$mday$mon$year"; print "Filedate is $filename\n\n"; -Original Message- From: Fernando Freire Baez (Medicare) [mailto:ffreire@;exchange.triples-med.org] Sent: 14 November 2002 13:18 To: '[EMAIL PROTECTED]' Subject: [PMX:#] Date substract problem Hello, I have an script that have to open and read a file all days in the morning. The script is fine but I have a little doubt about the file name. The file name is the day before the current day, so, for example: today is 11/14/2002 and the name of the file that the script have to open is 11132002.txt (the day before the current day). I don't know if exists any function or module that I can use to substract 1 day from the current day and the result are the name of the file that the script have to proccess. Please let me know any trick or module. Thanks in advance as always. ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs The information in this email is confidential and may be legally privileged. It is intended solely for the addressee. Access to this email by anyone else is unauthorised.if you are not the intended recipient, any disclosure, copying, distribution, or any action taken or omitted to be taken in reliance on it is prohibited and may be unlawful. Please note that any views, opinions or advice contained in this email are those of the sending individual and not necessarily those of the firm. It is possible for data transmitted by e-mail to be deliberately or accidentally corrupted or intercepted. For this reason, where the communication is by e-mail, J&E Davy does not accept any responsibility for any breach of confidence which may arise from the use of this medium. If you have received this e-mail in error please notify us immediately at mailto:helpdesk@;davy.ie and delete this e-mail from your system. ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
RE: NT Service Password
Hi, I believe the answer lies in Win32::Lanman::ChangeServiceConfig, please ignore previous message. thanks, Conor -Original Message- From: Conor Lillis Sent: 29 August 2002 11:58 To: [EMAIL PROTECTED] Subject: NT Service Password Hi, I am curious to know has anyone found a way to update the password that an NT service uses, via PERL ? I would like to be able to a. programatically stop services on remote servers (can do, works) b. Change the NT account and/or password the service uses fior security context (cannot do !) c. Restart the service (can do) under the new NT credentials (can do, works). If anyone has done it, or knows how, that'd be great thanks, Conor The information in this email is confidential and may be legally privileged. It is intended solely for the addressee. Access to this email by anyone else is unauthorised.if you are not the intended recipient, any disclosure, copying, distribution, or any action taken or omitted to be taken in reliance on it is prohibited and may be unlawful. Please note that any views, opinions or advice contained in this email are those of the sending individual and not necessarily those of the firm. It is possible for data transmitted by e-mail to be deliberately or accidentally corrupted or intercepted. For this reason, where the communication is by e-mail, J&E Davy does not accept any responsibility for any breach of confidence which may arise from the use of this medium. If you have received this e-mail in error please notify us immediately at mailto:[EMAIL PROTECTED] and delete this e-mail from your system. ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs The information in this email is confidential and may be legally privileged. It is intended solely for the addressee. Access to this email by anyone else is unauthorised.if you are not the intended recipient, any disclosure, copying, distribution, or any action taken or omitted to be taken in reliance on it is prohibited and may be unlawful. Please note that any views, opinions or advice contained in this email are those of the sending individual and not necessarily those of the firm. It is possible for data transmitted by e-mail to be deliberately or accidentally corrupted or intercepted. For this reason, where the communication is by e-mail, J&E Davy does not accept any responsibility for any breach of confidence which may arise from the use of this medium. If you have received this e-mail in error please notify us immediately at mailto:[EMAIL PROTECTED] and delete this e-mail from your system. ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
NT Service Password
Hi, I am curious to know has anyone found a way to update the password that an NT service uses, via PERL ? I would like to be able to a. programatically stop services on remote servers (can do, works) b. Change the NT account and/or password the service uses fior security context (cannot do !) c. Restart the service (can do) under the new NT credentials (can do, works). If anyone has done it, or knows how, that'd be great thanks, Conor The information in this email is confidential and may be legally privileged. It is intended solely for the addressee. Access to this email by anyone else is unauthorised.if you are not the intended recipient, any disclosure, copying, distribution, or any action taken or omitted to be taken in reliance on it is prohibited and may be unlawful. Please note that any views, opinions or advice contained in this email are those of the sending individual and not necessarily those of the firm. It is possible for data transmitted by e-mail to be deliberately or accidentally corrupted or intercepted. For this reason, where the communication is by e-mail, J&E Davy does not accept any responsibility for any breach of confidence which may arise from the use of this medium. If you have received this e-mail in error please notify us immediately at mailto:[EMAIL PROTECTED] and delete this e-mail from your system. ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
RE: Should I use perl?
I was also looking at writing a script to do the samer, however there is a great utility called HostMonitor that will perform 98% of what you want (www.ks-soft.net). Play around with it for a half day, see what you think. Conor -Original Message- From: Ken Swift [mailto:[EMAIL PROTECTED]] Sent: 28 June 2002 21:08 To: Perl Win32 List Subject: Should I use perl? I am having seconds, third and fourth thoughts about using perl to build an application. Here is a brief explaination about what I am trying to do. I am building a server monitoring program on Win32 using the WMI, HTTPLite, Net::Ping and IO::sockets. What happens is this. 1. Setup a group of different checks. For example Webservers would be a group then you assign individuals that should be notified if a error is detected with any "Check" in the group. 2. Setup the servers that belong to the group. Each server can be flagged online/offline, so that error are not reported if the server is not online. 3. Setup the checks that belong to a server. For example: Disk Spacer, Memory, HTTP Response Codes, Ping, TCP/IP port access, Service Status, Server Status and whether or not a section of text is found in a webpage. Each check is configured to repeat at a certain interval for example disk checks do not as often as service checks. As you can see...the multiplying factor can quickly add up. For example 2 Groups with 5 servers in each and 8 checks per server is 80 checks. I am storing all the configs in flat files, so that I could be database independent. Now...the problem. I open up a file that has all the checks in it and run each check in a fork() thread/process. Each check is in an infinite loop while(), so that it runs until the application is terminated. This entire application is a win32::daemon that runs as a service at server startup. I read somewhere that I can have a max of 64 fork() thread/processes. Is perl an OK language to do this application in or should I go down a different road? Thanks -- Ken __ Do You Yahoo!? Yahoo! - Official partner of 2002 FIFA World Cup http://fifaworldcup.yahoo.com ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs The information in this email is confidential and may be legally privileged. It is intended solely for the addressee. Access to this email by anyone else is unauthorised.if you are not the intended recipient, any disclosure, copying, distribution, or any action taken or omitted to be taken in reliance on it is prohibited and may be unlawful. Please note that any views, opinions or advice contained in this email are those of the sending individual and not necessarily those of the firm. It is possible for data transmitted by e-mail to be deliberately or accidentally corrupted or intercepted. For this reason, where the communication is by e-mail, J&E Davy does not accept any responsibility for any breach of confidence which may arise from the use of this medium. If you have received this e-mail in error please notify us immediately at mailto:[EMAIL PROTECTED] and delete this e-mail from your system. ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
RE: Changing startup for a service.
I would look at the registry based modules Tie::Registry I think it is, and update the parameters in the registry. eg. HKLM\CurrentControlSet\Services\MSSQLServer for MSSQLServer. set Start=2 for automatic startup of service. -Original Message- From: Edward G. Orton [mailto:[EMAIL PROTECTED]] Sent: 16 April 2002 16:45 To: Michael Stidham; [EMAIL PROTECTED] Subject: Re: Changing startup for a service. - Original Message - From: "Michael Stidham" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Cc: "Edward G. Orton" <[EMAIL PROTECTED]> Sent: Tuesday, April 16, 2002 11:31 AM Subject: Re: Changing startup for a service. > Win32::Service > I had already looked at Win32::Service, but it only has Stop, Start, Pause, Resume, GetStatus, and GetServices. It does not appear to have any functions for setting service parameters. ego Edward G. Orton, GWN Consultants Inc. Phone: 613-764-3186, Fax: 613-764-1721 email: [EMAIL PROTECTED] > > >From: "Edward G. Orton" <[EMAIL PROTECTED]> > >To: "Perl-Win32-Users Mailing List" > ><[EMAIL PROTECTED]> > >Subject: Changing startup for a service. > >Date: Tue, 16 Apr 2002 11:24:15 -0400 > > > >Does anyone know of a perl module/tool which can be used to > >change a Windows service from "manual" startup to "Automatic"? > > > >Config: > >Windows 2000 (SP2) > >ActivePerl 631 > >PDK 4.01 ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs The information in this email is confidential and may be legally privileged. It is intended solely for the addressee. Access to this email by anyone else is unauthorised.if you are not the intended recipient, any disclosure, copying, distribution, or any action taken or omitted to be taken in reliance on it is prohibited and may be unlawful. Please note that any views, opinions or advice contained in this email are those of the sending individual and not necessarily those of the firm. It is possible for data transmitted by e-mail to be deliberately or accidentally corrupted or intercepted. For this reason, where the communication is by e-mail, J&E Davy does not accept any responsibility for any breach of confidence which may arise from the use of this medium. If you have received this e-mail in error please notify us immediately at mailto:[EMAIL PROTECTED] and delete this e-mail from your system. ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
RE: Rename or copy of STDERR-File
To precede the log file with date & time, call the script by a batch file, with the following lines preceding the PERL script. - echo -- >> errors.txt # Puts a nice visible split in the log file. date /t >> errors.txt # Creates / appends to file errors.txt with date (no prompt). time /t >> errors.txt # Appends to errors.txt with time (no prompt). perl -w script.pl 2 >>errors.txt# Appends STDERR to errors.txt. - -Original Message- From: Roland Schoenbaechler [mailto:[EMAIL PROTECTED]] Sent: 18 December 2001 14:07 To: [EMAIL PROTECTED] Subject: Rename or copy of STDERR-File Hi, I'm running a script on Windows NT. When I start the script, I redirect STDERR to a file ( "perl -w script.pl 2>errors.txt"). The runs daily as a batch-job and the error-file is overwritten. However, under some conditions I want to keep the error-file. Is there a possibility to rename or copy the error-file at the end of the script? Or is it possible to include the date in the filename when I start the script? Thanks for your help Roland *** PLEASE NOTE *** This message, along with any attachments, may be confidential or legally privileged. It is intended only for the named person(s), who is/are the only authorized recipients. If this message has reached you in error, kindly destroy it without review and notify the sender immediately. Thank you for your help. ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users The information in this email is confidential and may be legally privileged. It is intended solely for the addressee. Access to this email by anyone else is unauthorised.if you are not the intended recipient, any disclosure, copying, distribution, or any action taken or omitted to be taken in reliance on it is prohibited and may be unlawful. Please note that any views, opinions or advice contained in this email are those of the sending individual and not necessarily those of the firm. It is possible for data transmitted by e-mail to be deliberately or accidentally corrupted or intercepted. For this reason, where the communication is by e-mail, J&E Davy does not accept any responsibility for any breach of confidence which may arise from the use of this medium. If you have received this e-mail in error please notify us immediately at mailto:[EMAIL PROTECTED] and delete this e-mail from your system. ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users