> > if (...) { > > my @item_parts = split(/\n/, $item); > > printf ORDER ("\n%4d %-50s %3.2f %3.2f\n", > > $quantity, $item_parts[0], $price, $ext); > > } else { > > printf ORDER ("\n%4d %-50s %3.2f %3.2f\n", > > } $quantity, $item, $price, $ext); > > (Stirring it up a little:) > > With Python you wouldn't have had this problem. > > (Now duck, and run!)
Instead, might I suggest BraceBeGone, a module I whipped up last night? use BraceBeGone; if (...) my @item_parts = split(/\n/, $item); printf ORDER ("\n%4d %-50s %3.2f %3.2f\n", $quantity, $item_parts[0], $price, $ext); else printf ORDER ("\n%4d %-50s %3.2f %3.2f\n", $quantity, $item, $price, $ext); http://perl.jall.org/ It's just a simple source filter, and it's quite easy to break, but hey, it was fun! :) Mike Lambert