tariqahsan has asked for the wisdom of the Perl Monks concerning the following question:
doReport.pl:
use my.pm; ... format FOOTER = @|||||||||||||||||||||||||||||||||| S = Scheduled R = Requested ... "MyCompany Information Systems" .
my.pm :
package my; require Exporter; @ISA = qw(Exporter); @EXPORT = qw(print_report); sub print_report { $file = "output.txt"; open (FILE,"$file") || die "Can't open $file for reading: $!\n"; while ( defined($_ = <FILE>) ) { print $_; } }
output.txt:
The last line from the file before the footer note - WRITTEN-OFF EVENTS 20030614 Daily EN_US`AWS`20030613`20030613` +YES
prints with out the footer notes!
Any idea why this is happening?
20030614 Edit by Corion: Added formatting and CODE tags
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Strange problem reading a text file
by halley (Prior) on Jun 13, 2003 at 20:20 UTC | |
by tariqahsan (Beadle) on Jun 13, 2003 at 20:53 UTC | |
|
Re: Strange problem reading a text file
by converter (Priest) on Jun 13, 2003 at 21:08 UTC | |
|
Re: Strange problem reading a text file
by Nkuvu (Priest) on Jun 13, 2003 at 20:37 UTC |