#!/usr/bin/perl -w use strict; my $str = $ARGV[0] or print "$0: [str] [file]\n" and exit; my $file = $ARGV[1] or print "$0: [str] [file]\n" and exit; open(IN, $file) or print "cant open $file" and exit; while(){ print "$_$str"; }