in reply to Parsing a Pipe delimied file
use strict; use warnings; local $/="|"; # Record Separator my @buf; while (<DATA>){ #next unless $_=~/\w/; # Ignore Blank ("\n" lines s/\n//; # Zap newlines push @buf,$_; Print_It() if (3==@buf); } Print_It(); #--------------------- sub Print_It{ print join("",@buf),"\n"; @buf=(); } __DATA__ a|b|c|d|e|f|g|h|i|j|k|l|m|n|o|p|q|r| s|t|u|v|w|x|y|z|A|B|C|D|E|F|G|H|I|J| K|L|M|N|O|P|Q|R|S|T|U|V|W|X|Y|Z|1|2| 3|4|5|6|7|8|9|10|11|12|13|14|15|16|17| 18|19|20
“PHP is a minor evil perpetrated and created by incompetent amateurs, whereas Perl is a great and insidious evil perpetrated by skilled but perverted professionals.”
― Jon Ribbens
|
|---|