Just another Perl shrine | |
PerlMonks |
Re: Split lines in file to columnsby hippo (Bishop) |
on Mar 20, 2019 at 09:43 UTC ( [id://1231483]=note: print w/replies, xml ) | Need Help?? |
But value for colD is not captured correctly, as string in colD has sapces in between.my ($colA, $colB, $colC,$colD) = split( /\s+/, $line, 4); If value for $colB = XYZ and $colD contains substring = Region , I need to replace the $colB from XYX to N/A. There are many ways to do this. What did you try? How did it fail?
In Section
Seekers of Perl Wisdom
|
|