Suddenly, part 3 -- it's working!!

2014-08-06 Thread ESChamp
I installed strawberry perl, edited out all my feeble attempts at troubleshooting, and -- voila! --, it's working. Thanks for all your help and encouragement. At my age, I'll never be a perl programmer and having to take Neurontin doesn't help my mental accuity, but getting through this makes me

What's wrong with this program?

2014-08-06 Thread ESChamp
The program begins #!/usr/bin/perl use Tie::File; use File::Copy 'copy'; use File::Spec; my $copy="00-copy.htm"; my $recapfile="00recap.txt"; my $htmfile="00.htm"; my $ct; tie my @bfile, 'Tie::File', $recapfile or die "cannot tie recapfile and bfile $!"; tie my @hfile, 'Tie::File',

Re: Which perl for Windows?

2014-08-06 Thread ESChamp
ESChamp wrote on 8/5/2014 5:20 PM: > Which perl should I (an occaisonal perl user, a rare perl programmer) > use? I see > > cygwin > strawberry perl > activestate perl > dwim perl Thank you. I downloaded and installed the latest strawberry. -- To unsubscribe, e-mai

Which perl for Windows?

2014-08-05 Thread ESChamp
Which perl should I (an occaisonal perl user, a rare perl programmer) use? I see cygwin strawberry perl activestate perl dwim perl ??? Thanks. -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/

Re: Suddenly.... Part 2

2014-08-05 Thread ESChamp
Here's a small portion of my script: #!/usr/bin/perl use Tie::File; use File::Copy 'copy'; use File::Spec; my $copy="00-copy.htm"; my $recapfile="00recap.txt"; my $htmfile="00.htm"; tie my @hfile, 'Tie::File', $copy or die "cannot tie copy and hfile $!"; tie my @bfile, 'Tie::File',

Re: Philosophical Question About Group

2014-08-02 Thread ESChamp
Thanks, Shawn. Responses are inline, below. Shawn H Corey wrote on 8/2/2014 3:49 PM: > On Sat, 02 Aug 2014 15:01:50 -0400 > ESChamp wrote: > >> So what I'm asking is, how does a person like me ask questions here >> that are likely to produce what I need? > > 1

Philosophical Question About Group

2014-08-02 Thread ESChamp
When I think of the word "beginners", I think of people starting out to learn perl and looking for advice. I'm actually not a beginner but a sort of "returner". Almost 80 years old, I use an occasional perl script to do a job that has to be repeated a couple of times a week, or one that is used on

Re: Suddenly.... Part 2

2014-07-31 Thread ESChamp
John W. Krahn wrote on 7/31/2014 3:11 AM: > Peter Holsberg wrote: >> I think I've isolated the section that is not doing what I want. >> >> open (FHIN, "$recapfile") or die $!; > > That would be better as: > > open my $FHIN, '<', $recapfile or die "Cannot open '$recapfile' because: > $!"; Thank

Re: Suddenly this script is not working!

2014-07-30 Thread ESChamp
Robert Wohlfarth wrote on 7/30/2014 10:31 AM: > On Wed, Jul 30, 2014 at 1:00 AM, ESChamp <mailto:esch...@gmail.com>> wrote: > > 0D 0A 3C 70 72 65 3E 0D 0A > > so no invisible characters. > > > Or maybe occurs on the first line, in which case $inde

Re: Suddenly this script is not working!

2014-07-29 Thread ESChamp
Jim Gibson wrote on 7/29/2014 10:08 PM: > > On Jul 29, 2014, at 5:12 PM, ESChamp wrote: > >> ESChamp wrote on 7/28/2014 6:59 PM: >> >> Let me backtrack and provide some background information. >> >> This script processes two files, recapfile, a plain tex

Re: Suddenly this script is not working!

2014-07-29 Thread ESChamp
ESChamp wrote on 7/28/2014 6:59 PM: > Suddenly, without warning or error messages, the script below is > producing null for values of $hfile and $bfile! > > The script begins: > > #!/usr/bin/perl > > use Tie::File; > use File::Copy 'copy'; > use File

Suddenly this script is not working!

2014-07-28 Thread ESChamp
Suddenly, without warning or error messages, the script below is producing null for values of $hfile and $bfile! The script begins: #!/usr/bin/perl use Tie::File; use File::Copy 'copy'; use File::Spec; and further down, it has: # Tie it to an array # (my $copy = $htmfile) =~ s/(\.htm)\z/-Copy

Re: Apologetic request for simple one-off script

2014-07-17 Thread ESChamp
Michael Lynch has written on 7/17/2014 8:30 AM: > how about using awk to print the last column, using number of columns > variable $NF: > > |awk '{print $NF}' file| Great idea! In Windows, I used gawk "{print $NF}" file Thanks. -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org

Re: Apologetic request for simple one-off script

2014-07-13 Thread ESChamp
Paul Johnson has written on 7/13/2014 7:22 PM: > On Sun, Jul 13, 2014 at 06:44:18PM -0400, ESChamp wrote: >> Paul Johnson has written on 7/13/2014 5:00 PM: >> > perl -nale 'print $F[-1]' < original_file.txt > just_email.txt >> >> e:\Docs\>perl

Re: Apologetic request for simple one-off script

2014-07-13 Thread ESChamp
Paul Johnson has written on 7/13/2014 5:00 PM: > perl -nale 'print $F[-1]' < original_file.txt > just_email.txt e:\Docs\>perl -nale 'print $F[-1]' < 4sam.txt > just_email.txt Can't find string terminator "'" anywhere before EOF at -e line 1. ??? 4sam.txt is the file to be operated on. SAmple lin

Apologetic request for simple one-off script

2014-07-13 Thread ESChamp
I apologize for having to ask this but my nearly-80-year-old brain just could not come up with a solution. I have a text file consisting of several space-separated fields: lastname firstname other other other ... emailaddress I wish to write a new file that contains only the emailaddress field c