- or download this
open DOM_WORK, '>/usr/spool/lpd/dom/dom.work';
&get_text;
...
}
&get_domkey;
}
- or download this
open DOM_WORK, '>/usr/spool/lpd/dom/dom.work';
&get_text;
- or download this
open my $DOM_WORK_FH, '>/usr/spool/lpd/dom/dom.work' or die "Open dom.
+work failed $!";
get_text($DOM_WORK_FH); # you could also pass in the filename and open
+ the file in the sub...
- or download this
sub get_text{
my @text=(<>);
my $line =0;
foreach $line (@text) {
- or download this
sub get_text {
my $out_fh=shift #what filehandle to write to
while (<>) { # read a line at a time into $_
- or download this
my $text =$text[$line];
$text =~tr/\x0c-\x0d//d;
- or download this
tr/\x0c-\x0d//d; # strip unwanted chars from $_
- or download this
select DOM_WORK;
print "$text[$line]";
close DOM_WORK;
- or download this
print $out_fh $_;
- or download this
use strict;
use warnings;
...
get_text('/usr/spool/lpd/dom/dom.work');
+
get_domkey();