Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: right justify

by pachydermic (Beadle)
on Jul 17, 2013 at 14:18 UTC ( #1044820=note: print w/ replies, xml ) Need Help??


in reply to right justify

It's a good idea to put your code between \<code\></code> tags so that we can read your stuff!

open(CUSTORDS, ">\\\\bcedi\\d\$\\dsdata\\rp\\lby\\custords.dat")||die +"Can't open file"; while ( my @row = $sth->fetchrow_array() ) { $lineStatus = $row[0]; $style = $row1; $colorCode = $row2; $lblCode = $row3; $totalQty = $row4; $startDate = $row5; $orderType = $row6; $orderNum = $row7; $orderStatus = $row8; $confType = $row9; $poNum = $row10; $customer = $row11; $sku = $style . $colorCode . ($space x (32 - length($style . $colorCod +e))); $company = $space x 3; $division = $space x 8; $corp = $space x 12; $sold = $space x 8; $dept = $space x 3; $shipTo = $space x 12; $totalQty = $totalQty . ($space x (8 - length($totalQty))); $poNum = $poNum . ($space x (13 - length($poNum))); $customer = $customer . ($space x (8 - length($customer))); $remarks = $space x 30; $orderStatus = $orderStatus . ($space x (4 - length($orderStatus))); $year = substr($startDate,0,4); $month = substr($startDate,5,2); $day = substr($startDate,8,2); $startDate = $year . $month . $day; $poNum = substr($poNum,0,13); print CUSTORDS "$sku$company$division$corp$sold$dept$shipTo$totalQty$s +pace$poNum$customer$remarks$orderStatus$startDate\n";


Comment on Re: right justify
Download Code
Replies are listed 'Best First'.
Re^2: right justify
by marto (Bishop) on Jul 17, 2013 at 15:21 UTC

    "It's a good idea to put your code between \<code\></code> tags so that we can read your stuff!"

    For clarity code and data go between code tags like this: <code>code and data goes here.</code>.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1044820]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (9)
As of 2015-07-08 02:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (93 votes), past polls