in reply to Search and replace with a wild card
Well you have totally got me on the logic! Why not just print "NAME DESCRIPTION DATE\n" for 1..$n; anyway to convert what you have to what you say you want:
while(<DATA>){ s{(NAME)\d*\s*(DESC)\d*\s*(DATE)\d*\s*} {$1 ${2}RIPTION $3\n}g; print; } __DATA__ NAME010 DESC025 DATE009 NAME011 DESC035 DATE009
In general there is nothing that perl *can't do* when it comes to munging text.
cheers
tachyon
|
|---|