Hi Mike, Look at line 63 and the following line: Note the &amver; statement. elsif ( $dir1 eq 'gaim' or $dir1 eq 'devilspie' ) &amver; { system (" ./autogen.sh --prefix=$prefix --sysconfdir=$sys --localstatedir=$local $debug - ... }
There are two problems with this: 1. Perl always requires braces around blocks such as llops or conditionals. 2. Other c-based languages will see a single statement such as that as the entire block, and prevent the compiler from recognizing the next, properly enclosed, block. I have a feeling that part of your problem has to do with format and readability. With all your code flush left as it is, and your placement of braces varying through your code, it is very hard to track the flow of activity. You should: 1. Adopt a consistent standard for where opening and closing braces go. 2. Use indentation. Choose an indentation size to your liking [I have recetly shifted from 3 to 2 spaces] and indent code inside each block by on tab. Any good code editor will make this easy by auto-indenmting to the current tab with each new line, as well as indenting or unindenting whole sections of code with the Tab or Shift+Tab. 3. Break up lines that are so long that you have to scroll off the screen to see them. A standard indentation style will make errors in the flow stand out much more clearly. I noticed the error on line 63 while I was trying to put the code in readable form. It stands out that way: system ("checkinstall -R -y --pkgname=$dir1\"vte\"" . " --pkgversion=$ARGV[0] --pkgrelease=$ARGV[1] --strip=$strip " . "--stripso=$stripso"); } elsif ( $dir1 eq 'gaim' or $dir1 eq 'devilspie' ) &amver; { system (" ./autogen.sh --prefix=$prefix --sysconfdir=$sys" . " --localstatedir=$local $debug --enable-gtk-doc=no" . " --disable-werror --disable-more-warnings"); system 'make'; system ("checkinstall -R -y --pkgname=$dir1 --pkgversion=$ARGV[0]" . " --pkgrelease=$ARGV[1] --strip=$strip --stripso=$stripso"); } elsif ( ... See how the opening brace, by being forced to a line of its own, stands out? An appropriate indentation stylke will tend to make such anamolies reveal themselves. A little effort in developing a standard will pay off in easier comprehension. Joseph mike wrote: > I have the attached sub in code.pl called in the attached build.pl > > When I try to call it, I get an error thrown up > > Anyone any idea what I am doing wrong? > > >----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- > Name: code.pl > code.pl Type: Perl Program (application/x-perl) > Encoding: quoted-printable > > Name: build.pl > build.pl Type: Perl Program (application/x-perl) > Encoding: quoted-printable > > >----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- > -- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]