Two lines should do the job:
#! perl -slw use strict; print "Name of consumer Subdivision Amount Type of work Phase"; printf "%-14s %14s %7.2f %-14s %-s\n", m[(\S+)\s+(\S+)\s+(\S+)\s+(.+)\s+(\S+)$] while <DATA>; __DATA__ Nancy Location1 600.00 New service Single Stella Location2 1000.00 Replacement Single Julie Location3 400.00 Replacement Three Debbie Location4 800.00 New service Three
In reply to Re: Text file processing question
by BrowserUk
in thread Text file processing question
by perl_seeker
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |