Re: Suddenly this script is not working!

2014-07-30 Thread Jim Gibson
On Jul 29, 2014, at 11:00 PM, ESChamp wrote: > Jim Gibson wrote on 7/29/2014 10:08 PM: >>> > >> This is all speculation because you have not provided us with your exact >> program and data files. > > I was warned not to post a 3000 line data file and a 150 line program, > but if you'd like me

Re: Suddenly this script is not working!

2014-07-30 Thread David Precious
On Wed, 30 Jul 2014 11:55:46 -0400 ESChamp wrote: > Robert Wohlfarth wrote on 7/30/2014 10:31 AM: > > On Wed, Jul 30, 2014 at 1:00 AM, ESChamp > > wrote: > > > > 0D 0A 3C 70 72 65 3E 0D 0A > > > > so no invisible characters. > > > > > Or maybe occurs on

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 > wrote: > > 0D 0A 3C 70 72 65 3E 0D 0A > > so no invisible characters. > > > Or maybe occurs on the first line, in which case $index will have > the value 0, which i

Re: Suddenly this script is not working!

2014-07-30 Thread Robert Wohlfarth
On Wed, Jul 30, 2014 at 1:00 AM, ESChamp wrote: > 0D 0A 3C 70 72 65 3E 0D 0A > > so no invisible characters. > > > Or maybe occurs on the first line, in which case $index will have > the value 0, which is treated as false, and your program will die. > > is line 709. No other line is simply H

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 text file, and copy, >> and HTML-formatted

Re: Suddenly this script is not working!

2014-07-29 Thread Jim Gibson
On Jul 29, 2014, at 5:12 PM, ESChamp wrote: > 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: >> >> > > Let me backtrack and provide some background information

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::Spec; > > > and further down, it has: > >

Re: Suddenly this script is not working!

2014-07-29 Thread Kent Fredric
The script begins: > > #!/usr/bin/perl > > use Tie::File; > use File::Copy 'copy'; > use File::Spec; > > I think this problem becomes much clearer if you enable strict. -- [ A.pl ] --- my @list = qw( a b c ); print "X $list Y"; -- [ A.pl output ] -- X Y -- [ B.pl ] -- use strict; my @list =

Re: Suddenly this script is not working!

2014-07-29 Thread Jim Gibson
On Jul 28, 2014, at 3:59 PM, ESChamp wrote: > Suddenly, without warning or error messages, the script below is > producing null for values of $hfile and $bfile! What are $hfile and $bfile? You don’t show them in your script. You show two arrays: @hfile and @bfile, but those are not the same as

Re: Suddenly this script is not working!

2014-07-29 Thread David Precious
On Mon, 28 Jul 2014 20:48:51 -0400 Shawn H Corey wrote: > > copy $htmfile, $copy; > > # always check for error > copy $htmfile, $copy or die "could not copy $htmlfile\n"; And even more helpfully, include in the message $! - which will contain the error message to show you what actually went w

Re: Suddenly this script is not working!

2014-07-28 Thread Shawn H Corey
On Mon, 28 Jul 2014 18:59:47 -0400 ESChamp wrote: > # Tie it to an array > # > (my $copy = $htmfile) =~ s/(\.htm)\z/-Copy$1/i; # the substitution will fail if the HTML file # doesn't have the correct extension die "invalid extension on $htmlfile\n" if $copy eq $htmlfile; > copy $htmfile, $copy;

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