in reply to concatenation through substitution?
?1: die 'insufficient arguments' unless @ARGV == 1; 2: open(IN, $ARGV[0]) or die "unable to open '$ARGV[0]'"; 3: while (my $line = <IN>) { 4: my $prefix = sprintf '%4d', $.; 5: print "$prefix: $line"; 6: } 7: close IN; 8: or 1: die 'insufficient arguments' unless @ARGV == 1; 2: open(IN, $ARGV[0]) or die "unable to open '$ARGV[0]'"; 3: while (my $line = <IN>) { 4: my $prefix = sprintf '%4d: ', $.; 5: print $prefix . $line; 6: } 7: close IN; 8:
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: concatenation through substitution?
by revdiablo (Prior) on Dec 30, 2004 at 21:47 UTC | |
by trammell (Priest) on Dec 31, 2004 at 00:33 UTC | |
|
Re^2: concatenation through substitution?
by Anonymous Monk on Dec 31, 2004 at 14:58 UTC |