in reply to new to format

The key is the caret in the first line and the double-tilde in the second line as shown here:

format OUTPUT = @<<<<<<<<<<< ^<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< $word, $definition ~~ ^<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< $definition .
More information at perlform.

BTW, probably just a copy-and-paste thing, but you forgot the comma to separate the variables. I added it.

HTH

Replies are listed 'Best First'.
Re: Re: new to format
by emilford (Friar) on Apr 25, 2002 at 21:37 UTC
    Damn, you monks are fast with the replies. Thanks for the info. About the comma, the code I have without the comma seems to work just fine. Is it necessary? -Eric

      You should use the commas. If you use -w, it will tell you that omitting them is deprecated. And if you have expressions instead of simple variables, you'll very likely get a syntax error if you leave them out.

      You're welcome. If the advice was helpful, consider making a donation. ;-)