#!/usr/bin/perl while(<>) { chomp; print $_ . substr($_,0,2) . "\n"; }
Accepts files either from standard input, or named on the command line, iterates over each line, prints with the first two characters (of each line) repeated at the end of the line.
In reply to Re: Array manipulation
by kschwab
in thread Array manipulation
by PetreAdi
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |