I think you're making the surrounding code too complicated:
Tested to work on your sample data.while (<IN>) { next if /^\s*$/; chop; /^Username\:\s+ (.*?) \s+ Owner\:\s+ (.*?)\s*$/x and do { print "$1,$2,"; next }; /^Last Login:\s+(\d+.*?\:\d+).*,\s*(\d+.*?\:\d+)/ and print "$1,$2\n"; }
In reply to Re: Parsing Text into CSV
by radiantmatrix
in thread Parsing Text into CSV
by bowei_99
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |