txfun has asked for the wisdom of the Perl Monks concerning the following question:
$|+;; my @InpFiles = glob (*.dat"); foreach my $inpfile (@InpFiles) { my $outfilename; my $outputfile = ""; open(HNDL, "$inpfile"); open $outfilename, ">", $outputfile; $|++; while(my $tmpline = <HNDL>){ print $outputfile "$parsedstring\n" or warn 'couldnot writ +e to file'; print $outputfile "$parsedsecondstring\n" or warn 'couldno +t write to file'; } } $|++; close( HNDL ); close( $outfilename ); undef $outfilename; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Perl - Linux - Unable to Write Files
by graff (Chancellor) on Mar 12, 2015 at 03:38 UTC | |
|
Re: Perl - Linux - Unable to Write Files
by trippledubs (Deacon) on Mar 12, 2015 at 03:41 UTC | |
|
Re: Perl - Linux - Unable to Write Files
by Anonymous Monk on Mar 12, 2015 at 03:56 UTC | |
|
Re: Perl - Linux - Unable to Write Files
by pvaldes (Chaplain) on Mar 12, 2015 at 22:27 UTC | |
by Anonymous Monk on Mar 13, 2015 at 05:11 UTC |