Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
Is there a one liner I can use to unpack, trim and join? TIAmy ($catno, $desc, $pack, $min, $gst, $cost, $unitcost, $retail, $barc +ode) = unpack("A7 x2 A30 A4 A4 x13 A7 x15 A8 A8 A8 x13 A13", $_); print CSTORE_OUT join(", ", "", "", $catdesc, "", "", "", "", $catno, +$barcode, $desc, $unitcost, "", "", "", $retail, $pack, $gst, "", "") +."\n";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Trimming unpack'ed strings
by almut (Canon) on Nov 05, 2008 at 22:14 UTC | |
|
Re: Trimming unpack'ed strings
by BrowserUk (Patriarch) on Nov 05, 2008 at 22:41 UTC | |
|
Re: Trimming unpack'ed strings
by gwadej (Chaplain) on Nov 05, 2008 at 22:15 UTC | |
by jwkrahn (Abbot) on Nov 05, 2008 at 22:40 UTC |