in reply to Re^2: Code that copy's multiple times a $ from a document
in thread Code that copy's multiple times a $ from a document
use strict; use warnings; my $sc = 1; while (<DATA>) { my (undef,$repeat,$seq) = split /\s+/,$_; my $i = 1; while ($repeat--) { printf "%d-%d %s\n",$sc,$i++,$seq; } $sc += 1; } __DATA__ 1 2 tt 2 3 aa 3 1 dd
Output
1-1 tt 1-2 tt 2-1 aa 2-2 aa 2-3 aa 3-1 dd
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Code that copy's multiple times a $ from a document
by Waterdrake (Initiate) on May 21, 2014 at 21:52 UTC |