Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
$item=”heat741a”; #for the sake of the example I fixed the variables $OrderQty = 55; open(LOG, ">order.xml") || die "Can't open the log file: $!\n"; $format = "format LOG = \n" . "\<\?xml version\=\"1\.0\"\?\>" . "\n" . "\<order\>" ."\n" . "\<product\>" .'@' . '<<<<<<' . "\<\\product\>" . "\n" . '$item' . "\n" . "\<quantity\>" .'@' . '<' x (length($OrderQty)-1) . "<\\quantity +>" . "\n" . '$OrderQty' . "\n" . "\<\\order\>" ."\n" . ".\n"; eval $format; write LOG; close LOG;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Format weird behaviour
by bobn (Chaplain) on Jun 08, 2003 at 02:07 UTC | |
|
Re: Format weird behaviour
by fglock (Vicar) on Jun 08, 2003 at 00:52 UTC | |
|
Re: Format weird behaviour
by antirice (Priest) on Jun 08, 2003 at 00:58 UTC | |
by Anonymous Monk on Jun 11, 2003 at 04:08 UTC | |
by antirice (Priest) on Jun 11, 2003 at 04:57 UTC | |
|
Re: Format weird behaviour
by gmpassos (Priest) on Jun 08, 2003 at 02:40 UTC |