in reply to Problems with format command

With no code this is just a guess, but you're probably trying to reference lexical variables (i.e. stuff you've declared with my $zorch = ...) which won't work. Formats only can see package variables (globals).

Update: I stand partially corrected. Shows how long it's been since I've really used write I guess. :)

Replies are listed 'Best First'.
Re^2: Problems with format command
by RazorbladeBidet (Friar) on Feb 24, 2005 at 19:51 UTC
    Sort of:

    Lexical variables (declared with "my") are not visible within a format unless the format is declared within the scope of the lexical variable. (They weren't visible at all before version 5.001.)


    From perlform
    --------------
    It's sad that a family can be torn apart by such a such a simple thing as a pack of wild dogs