in reply to Formatting Output
G'day jwalker1960,
Welcome to the monastery.
Here's another way to do it (using pack):
#!/usr/bin/env perl use strict; use warnings; print pack 'A12A11A9A40A*' => split /,/ for <DATA>; __DATA__ Account,Login Name,Password,Web Site,Comments Google Docs,george123,F0oB@r,http://www.google.com/docs,The GoodleDocs + site Amazon,george123,fo0bA7,http://www.amazon.com,The Amazone Kindle site Apple,george123,mM_B39Aa,https://www.apple.com/accountmanagement,My Ap +ple account
Output:
$ pm_pack_fmt_txt.pl Account Login Name Password Web Site + Comments Google Docs george123 F0oB@r http://www.google.com/docs + The GoodleDocs site Amazon george123 fo0bA7 http://www.amazon.com + The Amazone Kindle site Apple george123 mM_B39Aa https://www.apple.com/accountmanagemen +t My Apple account
-- Ken
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Formatting Output
by jwalker1960 (Initiate) on Oct 18, 2012 at 21:11 UTC | |
by kcott (Archbishop) on Oct 19, 2012 at 10:33 UTC |
In Section
Seekers of Perl Wisdom