in reply to How can I make it to a one liner

Another alternative, with the advantage of dealing well with a short line (one without three comma-separated values).
#!/usr/bin/perl use warnings; use strict; while (<DATA>) { chomp; my @line = split /,/; while (my @excerpt = splice(@line, 0, 3)) { print join(",", @excerpt), "\n"; } } __DATA__ userid,application_id,time,userid,application_id,time,userid,applicati +on_id,tim userid,application ,