Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re^3: Code that copy's multiple times a $ from a document

by poj (Abbot)
on May 21, 2014 at 19:50 UTC ( [id://1087014]=note: print w/replies, xml ) Need Help??


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

#!perl use strict; use warnings; open FH, '<', 'filename.txt' or die $!; open FHWRITE, '>>','results.txt' or die $!; my $count; while (my $line = <FH>){ print $line; my ($i,$repeat,$seq) = split /\s+/, $line; print FHWRITE "$i-$_ $seq\n" for (1..$repeat); $count += $repeat; } print "\n$count records written to results.txt\n";
poj

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1087014]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others learning in the Monastery: (4)
As of 2024-04-20 00:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found