RE: Any Good SCM tool to manage Perl Code locally

2010-03-15 Thread Dan Fish
You might want to have a look at Seapine Surround. It's not opensource, but you can get a free single-user license and it's a very good SCM program. It's also available on a variety of platforms. http://www.seapine.com/scmlicensing.html -Dan -Original Message- From: Parag Kalra

Out of Memory error with large Oracle DB extraction

2009-11-19 Thread Dan Fish
I'm working on a project that requires some rather large extractions from an Oracle DB (about 2 million rows) and while monitoring the task manager, I get an Out of memory error at about 2GB of mem usage. Client System Specifics: Win 2K3 Server 32-Bit SP2 Intel Xeon 2.5Ghz 8 CPU w/4GB

Simple regex question

2009-05-19 Thread Dan Fish
Simple question for the regEXperts out there... I have a string that is always in the format: a.nn+x.y a is always 5 chars n can be 1 or 2 digits x can be +/- (with sign), 1-4 digits y is always positive (no sign), 1-4 digits Some examples: A123C.11+002.001 FC32G.2-1.0

RE: Simple regex question

2009-05-19 Thread Dan Fish
Simple question for the regEXperts out there... I have a string that is always in the format:  a.nn+x.y a is always 5 chars n can be 1 or 2 digits x can be +/- (with sign), 1-4 digits y is always positive (no sign), 1-4 digits snip What do you mean by chars? Is any

Log::Dispatch and Data::Dumper

2009-04-25 Thread Dan Fish
I use Log::Dispatch frequently to set up both file and email logging. In the past I have also used it with Data::Dumper for logging in debug mode doing something like: $dispatcher-log(level = 'debug', message =sprintf(%s,Data::Dumper(\$somevar))); This makes logging hashes, arrays,

Parsing Key/Value pairs

2008-09-24 Thread Dan Fish
I've got a data file with a bunch of key/value pairs in the format key=value;. There may be only one to a line, or there may be several. I know I can figure out how to do this using split, but I thought surely there must be a more elegant solution. I was trying to do this using the following,

RE: How to ftp all the files?

2008-03-26 Thread Dan Fish
Might want to check out ncftp client. Works very well, multiple platform support and free! I use it for nearly all my batch ftp needs (albeit I have only used the Solaris version...) http://www.ncftp.com/ncftp/ -Dan -Original Message- From: Siegfried Heintze (Aditi) [mailto:[EMAIL

RE: learning WWW::Mechanize

2007-11-12 Thread Dan Fish
Assuming what you are really looking for from this is the page returned by the search, then you need to move the line: print $mechObject - content; to the end. -Dan --- #!/usr/bin/perl use strict; use warnings; use WWW::Mechanize; my $queryString =

RE: Capturing stdout and stderr without redirection

2007-01-18 Thread Dan Fish
. Bingo! Works perfectly! Thanks again -Dan -Original Message- From: Igor Sutton [mailto:[EMAIL PROTECTED] Sent: Thursday, January 18, 2007 2:31 AM To: Dan Fish Cc: beginners@perl.org Subject: Re: Capturing stdout and stderr without redirection Hi Dan, 2007/1/18, Dan Fish [EMAIL

Capturing stdout and stderr without redirection

2007-01-17 Thread Dan Fish
I've got a perl wrapper that conditionally runs another perl program using system() Something like: If( some_condition_applies){ system(myperlscript.pl); } myperlscript.pl will complete silently if everything runs right, but because it reads some data files and interfaces to a

How to push data onto a Class::Struct array?

2005-12-13 Thread Dan Fish
I've got a Class::Struct array (@stack) that has, as one of it's members, another array of Class::Struct (@bop) I know how to make assignments explicitly, but can't figure out the syntax to use to push onto the (stack-bop) array. I need to do this mainly because I'll be pushing varying numbers

Custom message formatting callback for Log::Dispatch

2005-07-08 Thread Dan Fish
I want to set up Log::Dispatch with two outputs... file and email. I'd like to use a callback function to do custom formatting of the message based on whether the output is going to a logfile or email. I.E. a one line entry if sent to logfile and a verbose description, possibly including html,

Looking for a mirror script (sorta)

2005-02-24 Thread Dan Fish
a pointer to a battle-tested script before I re-invent the proverbial wheel... Thanks, -Dan --- Dan Fish - [EMAIL PROTECTED] (remove REVERSE(nospam) above to reply via email... The spambots are smart enough nowadays to remove a nospam for you...:-) -- To unsubscribe, e-mail: [EMAIL PROTECTED

RE: Upgrading from Perl 5.6 to Perl 5.8

2005-02-24 Thread Dan Fish
For now, just accept it as one of Perl's quirks. Kind of like Java 1.4.5 being Java Five, or whatever it is ... :-) Or maybe like Solaris 9 = Solaris 2.9 = SunOS 5.9 :-) Gotta hand it to them Sun folks... Always keeping us guessing -Dan -- To unsubscribe, e-mail: [EMAIL

Dynamic pattern matching?

2005-01-18 Thread Dan Fish
I've got a data file that for the most part, the entries look like: (The last 3 columns are data points...) LKG_535 P10X0.6 -2.00E-09 0.00E+00 amps -3.800E-13 -3.920E-12 -7.800E-13 VT_GM L0.8H40 -1.15E+00 -7.50E-01 volts-1.104E+00 -1.111E+00 -1.110E+00

Pattern matching variables

2005-01-13 Thread Dan Fish
STU; if ($string =~ /(.{7})\s+(.{7})\s+/) { $p1 = $1; $p2 = $2; print (1 = $1, 2 = $2, p1 = $p1, p2 = $p2\n); $p1 =~ s/\s+//g; print (1 = $1, 2 = $2, p1 = $p1, p2 = $p2\n); } Thanks, -Dan --- Dan Fish - [EMAIL PROTECTED] A -good- dive buddy will be there if you run out

RE: Determine the Binary format of a file

2004-10-27 Thread Dan Fish
I have a binary file that I have been tasked to discover the format of and somehow convert the records to readable text. Is there any way I can find out what binary format the file is in, so I can create an template for unpack() to convert the binary to text? The best place to

Preventing shell redirection from creating empty file

2004-10-27 Thread Dan Fish
if empty. 2. Handle the output directly from within the perl script with open/print/close (I.E. avoid redirection) I was hoping some shell guru out there knows a more generic approach. Thanks, -Dan --- Dan Fish - [EMAIL PROTECTED] A -good- dive buddy will be there if you run out of air

RE: Piping output to and from external perl routine

2004-10-16 Thread Dan Fish
original request snipped Copy and paste Tom's code into your program. Yes... I could do that, and HAVE actually done that before for other routines due to the fire-fighting time constraints of the moment :-) This time I was hoping to increase my *very-limited* knowledge of Perl for a more

Piping output to and from external perl routine

2004-10-15 Thread Dan Fish
reasonable alternatives might be available... Thanks! -Dan --- Dan Fish - [EMAIL PROTECTED] A -good- dive buddy will be there if you run out of air, a -great- one will be there before you run out! -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http

Passing a variable to a package function vs. a local function

2003-09-29 Thread Dan Fish
I'm a bit new to this so please bear with me... I've written a script that uses CGI.pm something like this: use CGI::Carp qw(fatalsToBrowser); use CGI qw(:all); $query = new CGI; blah...blah... myfunc($query); blah...blah... sub myfunc{ my ($query) = @_; $foo=$query-param(foo);

Global variables

2002-08-20 Thread Dan Fish
What would be the preferred method of creating global variables that can be used in several different cgi scripts. For example, I'd like to create the variables $database, $user, $pass that I only have to change in one place, but can use in many different scripts. In C of course I'd just use

RE: Setting environment variable for process spawned with system()

2002-07-18 Thread Dan Fish
Yup... That worked just great! Thanks Jenda! -Dan -Original Message- From: Jenda Krynicky [mailto:[EMAIL PROTECTED]] Sent: Wednesday, July 17, 2002 10:33 AM To: Perl List Subject: Re: Setting environment variable for process spawned with system() From: Dan Fish [EMAIL PROTECTED

Setting environment variable for process spawned with system()

2002-07-17 Thread Dan Fish
Okay... maybe this is just so simple that I can't see the forest through the trees, but I've never had a need to do it before and so that inherently makes it difficult :-) I've got a script that runs gnuplot via system(). In order to use a custom path for gnuplot's fit regression function, It

Obtaining a slice of unique values from an array

2002-06-30 Thread Dan Fish
What is the most efficient (or at least AN efficient :-) way of obtaining a slice from an array wherein the slice contains only unique values found in the array? I.E. if @array = (1,3,5,5,3,5,2,1) then @slice = (1,3,5,2) Thanks, -Dan -- To unsubscribe, e-mail: [EMAIL PROTECTED] For

Use of uninitialized value

2002-06-29 Thread Dan Fish
Correct if I'm wrong, but I think I understand the following warning means I'm trying to make use of an empty or undef variable, but if the problem isn't obvious, how do I find it? and what does the chunk # mean? Use of uninitialized value at MMC/Online_Entry.pm line 47, INFILE chunk 541.

RE: Advanced Users in The Beginners List

2002-06-29 Thread Dan Fish
Perhaps we need a new module, PERLLIST::PARSE, that parses the incoming message and prefixes a category to the subject line so we can set up incoming mail filters to automatically dispose of 'dis'interesting messages I.E, (from some recent subject lines): FILE::changing the permission to owner

Script execution via email

2002-05-16 Thread Dan Fish
I've got a perl script that reads a dozen or so various documents and data files and generates a custom report for me (Don't we all have a couple dozen of these? :-) All of that is working fine... What I'd *like* to do is be able to generate these reports on-demand from remote locations by