use Modern::Perl; while () { my (undef, $first, $second, $third, $fourth, $balance) = split /[(,]/, $_, 6; $first++; $second += 3 unless $second == 0; $third += 3; $fourth += 10 if $fourth == 55 or $fourth = 56; say '(', join ', ', $first, $second, $third, $fourth, $balance; } __DATA__ (7, 0, 7, 55, NULL, 0, '', 'Wise Package Studio Overview and its advantage', 1260350867, '203.145.176.177', 0, 0, 0, 0, 197, 0, 0, 0, ''), (8, 0, 8, 55, NULL, 0, '', 'what is Tarma QuickInstall 2 and its usage', 1260351089, '203.145.176.177', 0, 0, 0, 0, 61, 0, 0, 0, ''), (9, 0, 9, 55, NULL, 0, '', 'what is Tarma Installer 5 and its usage?', 1260351321, '203.145.176.177', 0, 0, 0, 0, 253, 0, 0, 0, ''), (10, 0, 10, 56, NULL, 0, '', 'what is Tarma ExpertInstall 3 and its usage?', 1260351466, '203.145.176.177', 0, 0, 0, 0, 69, 0, 0, 0, ''), (11, 0, 11, 55, NULL, 0, '', 'What is Smart Install Maker and its usage?', 1260351588, '203.145.176.177', 0, 0, 0, 0, 241, 0, 0, 0, ''), (14, 0, 14, 55, NULL, 0, '', 'what is MSI Studio and its use?', 1260352667, '203.145.176.177', 0, 0, 0, 0, 174, 0, 0, 0, ''),