in reply to format declaration in a class
Or you could fully qualify your variables in your format and localize the appropriate variables i.euse vars qw($sku, $description, $price, $qty); foreach my $item (@items) { local($sku, $description, $price, $qty) = @$item; write(PURCHASEORDER); }
Or you can declare the lexicals before the format, if that's feasible. See. perlform for more info.use strict; format STDOUT = @<<<<<<< $::foo . local $::foo = 'a string'; write STDOUT; __output__ a string
_________
broquaint
update: added second to last sentence and finished the incomplete middle sentence
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: format declaration in a class
by saberworks (Curate) on May 25, 2004 at 04:06 UTC |