RE: Best way to compare to files in Perl

2010-09-23 Thread Roode, Eric
> I have thousands of files that I need to analyze with Perl and discard any > duplicates. I also need to implement a way to *not* save on disk any file > that a visitor uploads on the website in the case it's a file we already > have on disk. > > So, I need to compare files and have some kind

RE: Reading a line as an array

2010-09-21 Thread Roode, Eric
On Tuesday, September 21, 2010 11:27 AM, zilore mumba wrote: > Hello Perl Community, > This mail was posted on gmail but may have been vetted by the moderator. > firstly my apologies for 1) a very basic question, 2) something I > should do in C. > 1. I have rainfal data (attached as sample.txt) mo

RE: Delimiter or no Delimiter, that's the question

2010-08-05 Thread Roode, Eric
Why not just change the delimiter for the duration of that one subroutine, with the Delimiter() method, as shown in http://search.cpan.org/~adamk/Win32-TieRegistry-0.26/lib/Win32/TieRegist ry.pm#Examples ? -Eric From: activeperl-boun...@listserv.activestate.com [mailto:activeperl-boun...@li

Active Directory update weirdness via OLE

2010-07-26 Thread Roode, Eric
Hello all, I am trying to update user information in Active Directory via Win32::OLE, and I am seeing some behavior that confuses me. Consider the following short program: # use Modern::Perl; no warnings 'uninitialized'; use Win32:

RE: "Leaning Toothpicks" across OSs

2010-02-24 Thread Roode, Eric
On February 24, 2010, deane.rothenma...@walgreens.com wrote: > This is one of those silly moments when I can't remember a simple > trick, and I'm too cotton-pickin' lazy to dig through all my Perl > books to find it. I'm maintaining some old DOS code that has pathed > Linux filenames suffering fro

RE: IIS Configuration and Win32::OLE

2010-02-05 Thread Roode, Eric
On Thursday, February 04, 2010, Steve Stewart wrote: > Subject: RE: IIS Configuration and Win32::OLE > > > Have you turned on auditing for failed object access? It should > capture what the failure is in the security log. > Rgds, > Steve Steve, Once I figured out how to turn object access

RE: IIS Configuration and Win32::OLE

2010-02-04 Thread Roode, Eric
e- From: Ken Cornetet [mailto:ken.corne...@kimball.com] Sent: Wednesday, February 03, 2010 5:49 PM To: Jeff Saxton; Roode, Eric; activeperl@listserv.ActiveState.com Subject: RE: IIS Configuration and Win32::OLE Are you running that script as the default IIS user? By default the IIS default user (IUS

RE: IIS Configuration and Win32::OLE

2010-02-04 Thread Roode, Eric
On Wednesday, February 03, 2010, Paco Zarabozo wrote: > > Hi, > > -- > From: "Roode, Eric" > Sent: Wednesday, February 03, 2010 1:20 PM > To: > Subject: IIS Configuration and Win32::OLE > > >One C

IIS Configuration and Win32::OLE

2010-02-03 Thread Roode, Eric
Hello, I am not sure that this is a Perl problem, but I've been trying everything else for two weeks, maybe someone here can help. We had a Windows 2003 server running IIS, with an AS Perl CGI website. Then the server crashed. I have reinstalled the website on a different Win2003 serv

Perlapp "failed to initialize properly"

2010-02-01 Thread Roode, Eric
All, I do not often compile programs to EXE with perlapp -- but once or twice a year I need to. So today I need to recompile a program because of a minor change to it. When I ran perlapp to compile it, I get an error dialog that says, "The application failed to initialize properly (0xc

RE: Win32::OLE can't create object

2010-01-21 Thread Roode, Eric
From: activeperl-boun...@listserv.activestate.com [mailto:activeperl-boun...@listserv.activestate.com] On Behalf Of Roode, Eric Sent: Thursday, January 21, 2010 10:12 AM To: activeperl@listserv.ActiveState.com Subject: Win32::OLE can't create object The documentation for this module says,

Win32::OLE can't create object

2010-01-21 Thread Roode, Eric
The documentation for this module says, "The new() class method starts a new instance of an OLE Automation object. It returns a reference to this object or undef if the creation failed." undef is not particularly useful. Is there any way to get further information on why the object could not

RE: Read file names as per Windows file listing order

2009-07-09 Thread Roode, Eric
From: activeperl-boun...@listserv.activestate.com [mailto:activeperl-boun...@listserv.activestate.com] On Behalf Of Angelos Karageorgiou On Thursday, July 09, 2009 4:29 AM, Angelos Karageorgiou wrote: > > Ramkumar wrote: > > > > Please suggest if you have any idea to achive my requirement in perl

RE: Read file names as per Windows file listing order

2009-07-09 Thread Roode, Eric
On Thursday, July 09, 2009 6:35 AM, Ingo Schwarze wrote: > Hi Ramkumar, > > Ramkumar wrote on Thu, Jul 09, 2009 at 01:14:31PM +0530: > > > Please suggest if you have any idea to achive my requirement in perl. > > An easier solution than the one already suggested might be > to use the perl buil

Cannot install PDK 7.2

2008-06-23 Thread Roode, Eric
Today I downloaded the Perl Dev Kit 7.2.0 from ActiveState's site, and attempted to install it on our server. It started okay, but then I got an error dialog: "Error writing to file: Perl510RT72.dll Verify that you have access to that directory" [Retry] [Cancel] I do not know what "tha

RE: Telnet and ftp from Windows to Linux without SSH module (or withoutssh interface)

2008-06-11 Thread Roode, Eric
On Wednesday, June 11, 2008 11:51 AM, [EMAIL PROTECTED] wrote: > I want to telnet through Perl script from Windows m/c to Linux. Is > there any way which we can achieve this without using any ssh module > like Net::FTP & Net::SSH::W32Perl? Yes there is... but you really don't want to do that.

ppm GUI error

2008-06-03 Thread Roode, Eric
Hello all, I am using ppm and am getting an error when I try to add a repository. I go to "Edit" then select "Preferences", and I get a popup window with this error text: list must have an even number of elements at //Summ2/Perl/lib/ActivePerl/PPM/GUI.pm line 600. list must have an even num

I18N::Langinfo supplement/override (was RE: 5.10 and I18N::Langinfo)

2008-05-23 Thread Roode, Eric
Brian Raven wrote, on Thursday, May 22, 2008 11:49 AM: > Roode, Eric <> wrote: [...] > > I can't find I18N::Langinfo on CPAN or in any of several PPM > > repositories. > > This is reminiscent of another question I saw recently. According to > the do

5.10 and I18N::Langinfo

2008-05-22 Thread Roode, Eric
All, I just installed AS 5.10 (1003) on my server here, and for some reason, I18N::Langinfo was not installed. At least, I get "Can't locate I18N::Langinfo.pm in @INC (@INC contains [the stuff you'd expect it to contain]" when I try to use certain modules. I can't find I18N::Langinfo on

RE: PPM's weird list

2008-05-22 Thread Roode, Eric
Brian Raven wrote: > If you check the build status of those modules... Ah, that makes sense. Thanks, Brian. - Eric ___ ActivePerl mailing list ActivePerl@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

PPM's weird list

2008-05-21 Thread Roode, Eric
Hello, I just did a fresh install of 5.10, and am now installing modules via PPM. Why is it that I often see module variants but not the main root module? For example, with "All Modules" selected, PPM lists: CGI-Session-BitBucket CGI-Session-FlexMySql CGI-Session-

RE: read date stamp on file

2008-03-28 Thread Roode, Eric
Did you read the documentation for the File::stat module? Or the build-in stat() function? Eric From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Ted Yu Sent: Friday, March 28, 2008 5:09 PM To: activeperl@listserv.ActiveState.com Subject: read dat

RE: Scripting Challenge Beginner 5 - working with dates.

2008-02-28 Thread Roode, Eric
Suggest you don't parse the dates yourself. See Regexp::Common::time, Time::Normalize, Date::Parse, etc. Eric From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Basil A. Daoust Sent: Thursday, February 28, 2008 1:59 PM To: activeperl@listserv.Activ

RE: split question

2007-09-19 Thread Roode, Eric
Split most certainly can do that. Eric -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Thurn, Martin Sent: Wednesday, September 19, 2007 9:26 AM To: Stephane Legault; activeperl@listserv.ActiveState.com Subject: RE: split question Split can not do that.

RE: split question

2007-09-19 Thread Roode, Eric
split() has a third argument which specifies the maximum number of pieces to split the string into. So: ($first, $rest) = split /:/, $_, 2; will do what you want. Bonne chance, Eric J. Roode -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Stephane

RE: Decode just as Javascript's decodeURIComponent() does.

2007-07-30 Thread Roode, Eric
On Sunday, July 29, 2007 10:39 PM, Question wrote: > That's uri_escape() function in the URI::Escape module, sorry for > the clerical error. :-) > To others: > I just found the escape & unescape in the URI::Escape module. > It seems escape & unescape are not recommended ones, also the >

RE: Decode just as Javascript's decodeURIComponent() does.

2007-07-27 Thread Roode, Eric
Look for URI::Encode, in your local configuration or on CPAN. Eric From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Question Sent: Friday, July 27, 2007 1:20 AM To: Active Perl Subject: Decode just as Javascript's decodeURIComponent() does. Hi,

RE: print bug

2007-07-25 Thread Roode, Eric
Look up the "binmode" function. Eric -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Jeff Sadowski Sent: Wednesday, July 25, 2007 12:06 PM To: activeperl@listserv.ActiveState.com Subject: print bug I noticed a bug/"undesirable feature" in activeperl's

RE: How to install .pm files

2007-06-25 Thread Roode, Eric
Usually, modules come with installation instructions. If not, and if the module is just one or more .pm files, just copy the file(s) to a directory in your @INC list. Eric J. Roode -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of mattias jonsson Sent: S

RE: how to run a sql by passing variable

2007-05-11 Thread Roode, Eric
> From: Praveen G Siddavarapu > Sent: Thursday, May 10, 2007 8:45 PM > To: activeperl@listserv.ActiveState.com > Subject: how to run a sql by passing variable > > > All > > I have the below sql, it returns two rows, and I need to pass these > two dates and run another sql, how do I do that.. ba

RE: Confused by various Tk and GUI packages...? (Was: Plans for Perl6)

2007-05-10 Thread Roode, Eric
Can Tkx (or Tcl in general) use custom-made Windows widgets developed in .NET and loaded via DLL? I will say this about the documentation for Tkx and Tcl::Tk: They both seem to assume the programmer knows Tcl and/or is migrating from Perl/Tk. They seem to have little self-contained documentation

RE: amateur perl questions

2007-03-20 Thread Roode, Eric
Ukhas, Every now and then someone asks about certification, but the general consensus in the Perl community is that certification is not particularly useful. As for OOP, Perl is very OO. It has built-in support for data hiding, encapsulation, method calls, the whole ball of wax. Plus

RE: glob doesn't work on UNC paths?

2007-03-07 Thread Roode, Eric
Steve Stewart wrote: > Just a thought, why not use the short names for the directories i.e. Program Files = Progra~1, New Folder = newfol~1 ect you can list them using cmd dir /x this should solve it unless it is actually the share names that are causing the problem, in which case you can eith

RE: glob doesn't work on UNC paths?

2007-03-07 Thread Roode, Eric
Bill Luebkert wrote: >Roode, Eric wrote: >> Thanks, Bill. >> >> However, File::DosGlob does not appear to work if any of the path >> components contain spaces. >> (Which, in the actual case I was working on, they do). > >Must have a bug - you can still use

RE: glob doesn't work on UNC paths?

2007-03-07 Thread Roode, Eric
Thanks, Bill. However, File::DosGlob does not appear to work if any of the path components contain spaces. (Which, in the actual case I was working on, they do). Eric -Original Message- From: Bill Luebkert [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 06, 2007 6:06 PM To: Roode, Eric

glob doesn't work on UNC paths?

2007-03-06 Thread Roode, Eric
perl -le "print for glob ('c:\\dev\\*')" The above command prints out c:\dev\import c:\dev\lib c:\dev\test.pl etc. This is what I'd expect. perl -le "print for glob ('MyServer\\MyShare\\MyDir\\*')" This prints nothing. However, the command dir \\MyServer\MyShare

RE: another doggone newbie problem:"&&" not short-circuiting like itoughta

2007-02-28 Thread Roode, Eric
Dean, You're going to kick yourself. :-) >($x eq 'T') && next if value_in_list( $u, @listA ); This means exactly: if (value_in_list($u, @listA)) { ($x eq 'T') && next; } Eric ___ ActivePerl mailing list ActivePerl@listser

RE: How to compare two files and update to second file

2007-02-26 Thread Roode, Eric
--Original Message- From: Beri Veera-ext, Reddy [mailto:[EMAIL PROTECTED] Sent: Monday, February 26, 2007 10:15 AM To: Roode, Eric; ActivePerl Subject: RE: How to compare two files and update to second file Hi, Thanks for your information. Output file has some additional data. OUTPUT file s

RE: How to compare two files and update to second file

2007-02-26 Thread Roode, Eric
Why compare? Why not just copy the input to the output each time? Eric -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Beri Veera-ext, Reddy Sent: Monday, February 26, 2007 10:05 AM To: Brian Raven; ActivePerl Subject: RE: How to compare two files and u

threads module update

2007-01-10 Thread Roode, Eric
The latest AS perl core bundle, which seems to be ActivePerl 5.8.8.819, has version 1.31 of threads.pm. I need to use features that were introduced in version 1.34 (the current is version 1.57). But I don't have a C compiler. When I ask ppm ("ppm search threads"), it gives me info about "Gtk2-Ex

RE: FTPSSL help

2007-01-05 Thread Roode, Eric
You can expand the filename patterns yourself as follows: @files = map glob, @ARGV; Eric J. Roode -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Liza Das Sent: Friday, January 05, 2007 1:02 PM To: activeperl@listserv.ActiveState.com Subject: FTPSS

RE: DBI Oracle Windows 2003

2006-12-20 Thread Roode, Eric
It probably depends on how you're connecting to Oracle, and how the DBI and DBD::Oracle modules are installed. Where are those libraries installed, did you pass the DBD::Oracle test suite, and what is your DBI->connect statement? Eric J. Roode -Original Message- From: [EMAIL PROTECTED] [

RE: Writing BMP Files?

2006-12-11 Thread Roode, Eric
Why would anyone use BMPs when more portable, more efficient formats like PNG are available? The reason why there are no Perl modules to write BMPs is simple: Because nobody has yet written such a module. Are the specs open, or does Microsoft keep them a secret (like XLS and Word formats)? If

RE: content-type woes and the evils of \n -- any advice?

2006-12-11 Thread Roode, Eric
-Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Todd Morrison Sent: Friday, December 08, 2006 7:26 PM To: activeperl@listserv.ActiveState.com Subject: Re: content-type woes and the evils of \n -- any advice? > I would like to thank everyone for their help.

RE: A hash of arrays question.

2006-11-28 Thread Roode, Eric
I don't know where the idiom [EMAIL PROTECTED] = $new_item; came from, but it must stop. :-) Look up the 'push' operator: push @foo, $new_item; With an array reference, you need to use @{...} to dereference it: push @{ $complex{$thing}[$here] }, $new_item; Eric J. Roode -

RE: Phone Count

2006-11-28 Thread Roode, Eric
This'll work: $c{$_}++for map split(//)<> ;print qq{'$_'=>$c{$_}\n"for sort keys %c; Eric J. Roode From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of ruth wambua Sent: Tuesday, November 28, 2006 10:12 AM To: ActivePerl@listserv.ActiveState.com

RE: Epoch Time vs. DST/CST

2006-11-14 Thread Roode, Eric
No. The function localtime() does that conversion / compensation. Eric J. Roode From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED] Sent: Tuesday, November 14, 2006 2:42 PM To: activeperl@listserv.ActiveState.com Subject: Epoch Tim

RE: Backticks return question

2006-11-02 Thread Roode, Eric
Perhaps you could read the manual. Or try it yourself. From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED] Sent: Thursday, November 02, 2006 4:57 PM To: activeperl@listserv.ActiveState.com Subject: Backticks return question Gurus,

RE: linked-lists in perl???

2006-10-23 Thread Roode, Eric
-Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Stump, Gary Sent: Monday, October 23, 2006 1:49 AM To: Active Perl Subject: RE: linked-lists in perl??? > An array may be adeqate for many applications where a simple, linear, > double-linked list is required

RE: how to embed a javascript code within a .cgi file

2006-10-20 Thread Roode, Eric
e time to use real words. Thanks. Eric J. Roode From: ukhas jean [mailto:[EMAIL PROTECTED] Sent: Friday, October 20, 2006 4:37 AM To: Roode, Eric; Active Perl Subject: RE: how to embed a javascript code within a .cgi file Thanks Eric ... n Brian (and Bill too) ... u guyz have been awes

RE: how to embed a javascript code within a .cgi file

2006-10-19 Thread Roode, Eric
I didn't notice any fury directed at you. I hope you didn't interpret my post as being angry; if I had been angry, I would have stopped at the first paragraph and not spent a half-hour composing an educational reply. And I interpreted Brian's reply as a simple joke. Eric J. Roode _

RE: how to embed a javascript code within a .cgi file

2006-10-18 Thread Roode, Eric
Ukh, You have a fundamental misunderstanding of how the web works. You need to get that straightened out before you can continue. The WWW works as a massive client-server system. On the client side, you have a browser. On the server side, you have an HTTP agent called a web server. T

RE: linked-lists in perl???

2006-10-16 Thread Roode, Eric
Why would you ever want a LL in Perl? Perl's arrays make LLs almost completely irrelevent, except as a learning exercise. And even then they're not that useful, since it's not a data structure that makes sense in Perl. I've been programming Perl for twelve years; I've done websites, library modu

Content-type and HTTP status

2006-10-10 Thread Roode, Eric
All, I'm trying to figure out when to add which HTTP headers, and when. Which ones does IIS add automatically, and which ones does AS Perl add automatically, and which ones does my script need to provide? I have a CGI script that simply outputs a hardcoded page. It consists of nothing bu

RE: why we put #! /path/ of in the starting of line

2006-10-09 Thread Roode, Eric
Rishi, It's a Unix thing. In Unix shells, shell scripts are stored in plain text files like Perl programs are. They also use # as a comment character. When the first line starts with a #! (pronounced "shebang"), however, the shell hands the file over to another program for execution, i

RE: How to find which part of the code is taking much time in executionin a big perl file

2006-09-28 Thread Roode, Eric
Rishi, Martin Thuren already briefly mentioned Devel::DProf, but I think it deserves a second mention, especially in light of the other responses you have received on this topic. Benchmarking is useful for comparing two functionally identical sets of code, but it doesn't really do anythi

RE: Hash allocation via keys(%hash) -- space vs. efficiency

2006-09-26 Thread Roode, Eric
Nonsense. Perl is (overall) a slow, bulky language --- I'll be the first to admit that --- but there is nothing wrong with learning the limitations and strengths of the execution environment, and learning where and how one can make efficiency improvements, and how much (or how little) of a differe

RE: Hour validation

2006-09-20 Thread Roode, Eric
Interesting question. How do you mean "between"? Is 23:00 between 22:00 and 01:00? I would guess "yes", but that it's NOT between 01:00 and 22:00. Is that how you see it? If that's the case, it seems to me that B is between A and C if: A < B and B < C or A > C and (B >

RE: my n symbol table ...

2006-09-19 Thread Roode, Eric
Hey, I'm cool. :-)  You're the one with the double and triple question marks. :-)   There's nothing wrong with wanting to delve deeply into the font of Perl wisdom.  This particular path, however, doesn't really lead anywhere.  But keep on asking questions, keep on learning!   Eric J. Roode

RE: my n symbol table ...

2006-09-19 Thread Roode, Eric
19, 2006 9:34 AMTo: Active PerlSubject: RE: my n symbol table ... Then how does Activestate Perl keep track of all the my variables within a block??? I mean there has to be a way ... right??   Rgds, Raj SVK Team Lead, ICICI"Roode, Eric" <[EMAIL PROTECTED]> wrote: Lexical (

RE: Query in Perl

2006-09-19 Thread Roode, Eric
It depends on whether you want to do the comparison in Perl or in the database. If in Perl, it depends on whether you want to do it in the main code, in a library, read from a config file, etc. If in the database, it depends on which database product you're using and what interface you're

RE: my n symbol table ...

2006-09-19 Thread Roode, Eric
Lexical ("my") variables do not exist in the symbol table at all.  Only package ("global") variables do.   Eric J. Roode From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of ukhas jeanSent: Tuesday, September 19, 2006 8:58 AMTo: Active PerlSubject: my n symbol table ... Does t

RE: Working Out Dates

2006-09-07 Thread Roode, Eric
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Ewen Marshall Sent: Thursday, September 07, 2006 2:30 PM To: [EMAIL PROTECTED] Cc: activeperl@listserv.ActiveState.com Subject: Working Out Dates Hi guys, I looking for some help with dates. On a Win2k server I've got a MySQL database

RE: Newbie Question on references to anonymous subs in an array (whew!)

2006-09-07 Thread Roode, Eric
 On September 7, Deane Rothenmaier wrote: Perlers,  [...] Now to my question: Will this code gobble up a slew of memory for all those subs crammed into the array? Would referencing them help? How would I do that? I'm vaguely familiar with references but very uncertain as to how to apply them