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
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',
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 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/
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',
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
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
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
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
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
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, 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
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
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
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
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
16 matches
Mail list logo