in reply to Repeating a substitution
perl -pe 's/,/|/ for ($_) x 10'
Too obscure. This is of the types of constructs which, while being clever, earn perl the fame of being unreadable. There's way too much knowledge needed for a casual programmer to get things right.
I wouldn't use a statement modifier in this case, but a loop which uses another variable as loop variable:
perl -pe 'BEGIN {$n=shift} for my $c (1.. $n){ s/;/|/ }' 10 $files
edit: the two things to grasp here are
|
|---|