On Sun, Feb 01, 2015 at 09:56:39AM -0500, Harry Putnam wrote:
> Robert Wohlfarth <[email protected]> writes:
>
> > On Sat, Jan 31, 2015 at 3:58 PM, Harry Putnam <[email protected]> wrote:
> >
> > I have about 100 lines or so inside a File::Find:
You will likely help yourself out a lot with not only this problem but
others that you don't yet know about if you:
1. Split those 100 lines out into a separate subroutine.
2. Break that 100 line subroutine into at least four or five smaller
subroutines.
> >> find (
> >> sub {
> >> }, $tdir;
> >> );
> >
> > Why the semi-colon after $tdir? Seeing the parenthesis, I would guess that
> > $tdir is a parameter to a function call. It should not have a semi-colon
> > after it.
>
> I did notice that before posting, and try removing it, but received
> exactly the same error. So something is still going on somewhere
> else.
That may well be, but the semi-colon is an error, and the only one we
can see in the code you have posted.
$ perl -ce 'find ( sub {}, $tdir; )'
syntax error at -e line 1, near "$tdir;"
-e had compilation errors
$ perl -ce 'find ( sub {}, $tdir )'
-e syntax OK
--
Paul Johnson - [email protected]
http://www.pjcj.net
--
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
http://learn.perl.org/