http://qs1969.pair.com?node_id=107082


in reply to Re: errors revisited
in thread errors revisited

i ran your revised code it gave me these errors????
C:\Perl>perl -cw create.pl [Wed Aug 22 11:46:32 2001] (eval 1): Array found where operator expect +ed at (eva l 1) line 1, at end of line [Wed Aug 22 11:46:32 2001] (eval 1): (Do you need to predeclare Car +p::longmes s?) [Wed Aug 22 11:46:32 2001] (eval 1): Array found where operator expect +ed at (eva l 1) line 2, at end of line [Wed Aug 22 11:46:32 2001] (eval 1): (Do you need to predeclare Car +p::shortme ss?) [Wed Aug 22 11:46:32 2001] (eval 1): Array found where operator expect +ed at (eva l 1) line 3, at end of line [Wed Aug 22 11:46:32 2001] (eval 1): (Do you need to predeclare Car +p::shortme ss?) [Wed Aug 22 11:46:32 2001] (eval 1): Array found where operator expect +ed at (eva l 1) line 4, at end of line [Wed Aug 22 11:46:32 2001] (eval 1): (Do you need to predeclare Car +p::longmes s?) Undefined subroutine &Carp::longmess called at C:\PERL\lib/Carp.pm lin +e 296.

Replies are listed 'Best First'.
Re: Re: Re: errors revisited
by bikeNomad (Priest) on Aug 22, 2001 at 23:07 UTC
    His revised code didn't use CGI::Carp, so it couldn't have given those errors. Did you try to run his program from the command line as it stands?

    Note that there was still an error that was caught by the warnings/diagnostics: on line 93, there is a reference to $a, but nothing sets it. You probably want:

    foreach my $a (@filenames) { print "$a <p>Name:$_</p>"; } print "<hr />";