in reply to Writing to a new file with a dynamically created name
Hope this helps:
$chunklookup = "Datafile.txt"; open(DGRAB, $chunklookup) || die ("Could not open $chunklookup (DATA T +O GRAB) \n"); while (<DGRAB>) {push(@datain, $_)};close DGRAB; foreach @datain {$currentline =$_; @linesplitfetch = split(/,/, $currentline); open (MYFILE6, '>@linesplitfetch[0].html')|| die ("Could not open @lin +esplitfetch[0].html \n"); print MYFILE6 "$currentline here ";close(MYFILE6); } # foreach @datain
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Writing to a new file with a dynamically created name
by chromatic (Archbishop) on Feb 21, 2011 at 03:19 UTC |