[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

[MacPerl] Syntax problems . . .



Hiya again,

thanks to everybody who helped me on Monday (damn quick as well !!!),
the script is coming along well but I have an annoying problem.

I have written a subroutine to make and create names and files (and
directories) depending on input from forms.  The following,

sub make_file {
  if ($form{'EntryType'} eq "Enhanced") { ## if enhanced then create a
directory to put 5 files in (eventually)
    if (%page_loop = 1) {
      $dirname = "$root$Profiles$form(OCNumber)";
      mkdir ($dirname, 0755);
      }
    $filename =
"$root$Profiles$form(OCNumber)$dir$form(OCNumber)%page_loop$html";
    }
  else {
    $filename = "$root$Profiles$form(OCNumber)%page_loop$html"; ## not
enhanced only create 1 file
    }
  open (OUT,">$filename") ||
  }

, is the subroutine.  I am performing syntax checks as I go through so I
don't end up with one almighty mess at the end (I am still very new at
this) and I keep getting a report that there is a syntax error near the
final }  I can't see why and neither can Demon internt support (thanks
guys).  Can anybody give us a clue ???

thanks for the help . . .

--
Adam Reynolds.                   ||If sitting in a plane if flying
Multimedia Engineer.             ||then sitting in a boat is swimming,
Syphax Imaging Reproductions Ltd.||To get the real feeling
35 Parkside,                     ||get out of the vehicle.      };-)
Cambridge  CB1 1JE.              ||
                                 ||Only skydivers know why the birds
                                 ||sing . . .
Tel: (01223) 301103              ||Adam.Reynolds@syphax.co.uk
Fax: (01223) 300977              ||www.syphax.co.uk



***** Want to unsubscribe from this list?
***** Send mail with body "unsubscribe" to mac-perl-request@iis.ee.ethz.ch