Re: Ignorant wumpus? Or scoping problem?

2003-11-22 Thread Glenn Linderman
On approximately 11/22/2003 6:21 PM, came the following characters from the keyboard of $Bill Luebkert: Glenn Linderman wrote: Should it work as is? If not, why not? I can't find any documented reason why it shouldn't work, and I do find references in Camel that imply that eval'd code inherits

Re: Ignorant wumpus? Or scoping problem?

2003-11-22 Thread $Bill Luebkert
Glenn Linderman wrote: > Yes, there are a variety of workarounds. Just moving the variable > definitions out of the closure "works", but then it is prone to > conflicts with names in other parts of the program (in the real program, > not the test program. Once I resolved those conflicts, I'm

Re: Ignorant wumpus? Or scoping problem?

2003-11-22 Thread Glenn Linderman
On approximately 11/22/2003 5:51 PM, came the following characters from the keyboard of $Bill Luebkert: Glenn Linderman wrote: Prelude: Using Perl 5.8.0 ActiveState build 805 on Windows 2000 SP4 I have this script that is 1.2 MB long rather than post the whole thing, I've made a test case.

Re: Ignorant wumpus? Or scoping problem?

2003-11-22 Thread $Bill Luebkert
Glenn Linderman wrote: > Prelude: > > Using Perl 5.8.0 ActiveState build 805 on Windows 2000 SP4 > > I have this script that is 1.2 MB long rather than post the whole > thing, I've made a test case... surprisingly I was able to get it down > to 60 lines. I guess it could have even been a

Re: just installed ActivePerl on my win98 - what's next

2003-11-22 Thread Bernard Kenik
ultraedit gets my vote   - Original Message - From: Glenn Darwin To: Ted S. Cc: [EMAIL PROTECTED] Sent: Friday, November 21, 2003 11:03 PM Subject: Re: just installed ActivePerl on my win98 - what's next Here is my favorite...http://www.ultraedit.com/Gle

Fw: Removing double spaces from a file

2003-11-22 Thread Nicu Ionita
> > while () > { > s/\s\s/\ /g; > print OUT $_; > } > > > (Assuming IN is an already open filehandle to the source file, and OUT is one to a destination file.) This doesn't work. It's better: while () { s/\s{2,}/ /g;# these is a space print OUT $_; } Nicu __

RE: Removing double spaces from a file

2003-11-22 Thread
Assuming that you've read the file and put its contents into a variable called $text, I would write the following code:   $text =~ s/ +/ /g;   Then write $text back out to disk.   The code above will not do anything about tabs. It will also eliminate multiple spaces at the beginnings and e

RE: Removing double spaces from a file

2003-11-22 Thread Messenger, Mark
Q+DV: while () { s/\s\s/\ /g; print OUT $_; } (Assuming IN is an already open filehandle to the source file, and OUT is one to a destination file.) -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Saturday, November 22, 2003 11:

Ignorant wumpus? Or scoping problem?

2003-11-22 Thread Glenn Linderman
Prelude: Using Perl 5.8.0 ActiveState build 805 on Windows 2000 SP4 I have this script that is 1.2 MB long rather than post the whole thing, I've made a test case... surprisingly I was able to get it down to 60 lines. I guess it could have even been a little smaller... So I'm writing an i

Getting this simple program to work

2003-11-22 Thread franbarnett
In 'Learning Perl' instruction for first program is given: #! /usr/bin/perl print "Hello, world!\n"; $ chmod a+x my_ program $ ./my_program   On my windows XP I believe it goes as #!/usr/local/ActivePerl-5.8/bin/perl print "Hello, world!\n";   Is that correct, and what comes next?    Fran

Removing double spaces from a file

2003-11-22 Thread RWAPSoftware
What is the quickest and simplest method of ensuring a plain text file only has one space between each word?     --Rich Mellor RWAP Services35 Chantry Croft, Kinsley, Pontefract, West Yorkshire, WF9 5JHTEL: 01977 610509Visit our website at:URL:http://www.rwapsoftware.co.ukIn need of adventu