Perl vs. Java for string manipulation & regex

2007-06-24 Thread Jeni Zundel
So, recently, I wrote a nice little perl script to go through a moderately large file (about 400 Meg fixed record length file of rows that are 1870 characters wide). It runs quite fast; provides accurate results and I'm happy with it. My employer doesn't want to use it because it's in perl

Re: Nested loop

2007-04-19 Thread Jeni Zundel
foreach is dead? dangit... I loved that. and, java 5 just put in a for loop construct that is very similar to the foreach. jen On Thursday, April 19, 2007, at 08:08AM, "Chas Owens" <[EMAIL PROTECTED]> wrote: >On 4/19/07, Jenda Krynicky <[EMAIL PROTECTED]> wrote: >> From: "Chas Owens" <[EMAIL

Re: Text munging problem: question on while loop differences

2007-04-06 Thread Jeni Zundel
So, if I put a filehandle in the diamond, instead of empty diamond, does that mean that the first would operate line by line and the second would pull the whole file into memory? Thanks much, Jen On Apr 6, 2007, at 9:31 AM, Jeff Pang wrote: : Re: Text munging problem: question on while l

Re: Text munging problem: question on while loop differences

2007-04-06 Thread Jeni Zundel
What is the difference between: a. while(defined(my $line = <>)) ... and b. while(<>) On Apr 6, 2007, at 7:52 AM, Rob Dixon wrote: Why shift and unshift? Just use a for loop: #!/usr

portability?

2007-04-02 Thread Jeni Zundel
I do most of my studying/ prototyping on a mac. I admit it. I love my mac. So, I wrote a little script on my mac, as follows: #!/usr/bin/perl # dedupe.pl use strict; use warnings; my (@words, %schtuff, $word); # set up necessary variables. open FH, "c:/data/filename.txt"

Re: seeking pedagogic advice

2007-03-13 Thread Jeni Zundel
oh - forgot to also request: could you include your reasons why you might recommend a specific path? Helps me evaluate which learning path is right for me. thanks again, Jen Jeni Zundel wrote: I've been attempting to learn perl for about a month so far. I've taken the 4th

seeking pedagogic advice

2007-03-13 Thread Jeni Zundel
I've been attempting to learn perl for about a month so far. I've taken the 4th Edition of Learning Perl and I work through a chapter every few days. I just found an online resource at perl.org called Beginning Perl. I've used a few chapters out of this book; it's interesting to see the

Re: OT. Cron jobs

2007-03-11 Thread Jeni Zundel
will the job complete within 15 seconds? Jen On Mar 10, 2007, at 4:37 PM, Mike Blezien wrote: Hello, Sorry for the OT question, but couldn't find the info I was looking for and thought could get a quick answer from the list. We have a perl script that needs to run 4 times a minute. Can t

Re: confused about a regex

2007-03-08 Thread Jeni Zundel
I have to say - I am totally enamored with regex. Color me 'goober'. I just think that is a beautiful, concise, elegant way to make a substitution. All of that capability in one short string of characters... No if, then, else construct. Just - capture what is there; if it matches a .\w