perl_learner has asked for the wisdom of the Perl Monks concerning the following question:

i need to write a program that will generate a check this is my code so far.. format STDOUT = Check No. @<<<<<< $chkno first @<<<<<<<<<< last @<<<<<<<<<<<<<<< $first,$last Address:@<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< $addr[0] Address:@<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< $addr[1] Phone:@<<<<<<<<<<<< Date:@<<<<<<<<<<<< $phone,$date Pay to the Order of: @<<<<<<<<<<<<<<<<<<<<<<<<<<<<< $payee . format Amount: Amount: @#####.## $amount . format STDOUT = For:@>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> $memo Stamped Signature . i got this errors: am having syntax error line 24 EOF might be a run away multi line << string startng line 2

Replies are listed 'Best First'.
Re: perl format problem
by pg (Canon) on Jul 21, 2005 at 00:19 UTC

    Only talking about syntax: "format Amount:" should be "format Amount = ". I am not going to second guess your purpose.

Re: perl format problem
by jhourcle (Prior) on Jul 21, 2005 at 00:20 UTC

    Your second call to format ends in a colon, instead of the required equals sign.

      oh thanks. i change it and i got no error anymore but no result neith +er..what seems to be thr prob?

        What did you change it to? What's the rest of the code?

        format does nothing on its own. You also need to use write.