preahkumpii has asked for the wisdom of the Perl Monks concerning the following question:
Thanks for any help.#!/usr/bin/perl # chess.plx use warnings; use strict; use utf8; open THAI, "thaikjv-fixed.txt" or die $!; binmode(THAI, ":utf8"); foreach(<>) { if (/^@(...\d\d\d)/) { my $r = "$1.html"; open O, ">$r" or die $!; binmode(O, ":utf8"); print O "$_"; print "hi"; close (O); } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: splitting file with mutiple output filenames
by MidLifeXis (Monsignor) on Apr 11, 2012 at 12:37 UTC | |
|
Re: splitting file with mutiple output filenames
by preahkumpii (Novice) on Apr 11, 2012 at 09:17 UTC | |
by GrandFather (Saint) on Apr 11, 2012 at 09:31 UTC | |
by moritz (Cardinal) on Apr 11, 2012 at 09:49 UTC | |
by Anonymous Monk on Apr 11, 2012 at 09:24 UTC | |
|
Re: splitting file with mutiple output filenames
by snape (Pilgrim) on Apr 11, 2012 at 10:05 UTC |