rhiannasilel has asked for the wisdom of the Perl Monks concerning the following question:
#!/usr/bin/perl $upload="<upload dir>"; $output="<output dir>"; $inputFile="$upload/inputFile.txt"; $filename="$upload/file.txt.mrk"; $outFile="$output/test.tmp"; open(MYINPUTFILE, "<$filename"); # open for input open(MYOUTPUTFILE, ">>$outFile"); my(@lines) = <MYINPUTFILE>; my($line); foreach $line (@lines) { print $line; substr($line,11,13)=" "; print MYOUTPUTFILE "$line"; } close(MYINPUTFILE); close(MYOUTPUTFILE);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Search/Replace Character
by FunkyMonk (Bishop) on Apr 17, 2008 at 15:18 UTC | |
by rhiannasilel (Initiate) on Apr 17, 2008 at 18:52 UTC | |
|
Re: Search/Replace Character
by elmex (Friar) on Apr 17, 2008 at 15:43 UTC | |
by moritz (Cardinal) on Apr 17, 2008 at 15:46 UTC | |
by rhiannasilel (Initiate) on Apr 17, 2008 at 18:59 UTC |