#!/usr/bin/perl -- use strict; use warnings; Main( @ARGV ); exit( 0 ); sub Main { @_ or die Usage(); my( $find, $replace, $ntimes ) = @_; ... } sub Usage { qq{ Usage: trt "," "|" 10 trt ",,,,,,,,,," "||||||||||" Translate n times per line read from standard input, writing to standard output. The usage example replaces the first 10 "," characters with "|". Farts sounds like "trt". }; } ## end sub Usage