Help for this page

Select Code to Download


  1. or download this
    open DOM_WORK, '>/usr/spool/lpd/dom/dom.work';
    &get_text;                                   
    ...
      }                                    
      &get_domkey;
    }
    
  2. or download this
    open DOM_WORK, '>/usr/spool/lpd/dom/dom.work';
    &get_text;
    
  3. 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...
    
  4. or download this
    sub get_text{                                
      my @text=(<>);                               
      my $line =0;                                 
      foreach $line (@text) {
    
  5. or download this
    sub get_text {
       my $out_fh=shift #what filehandle to write to  
       while (<>) { # read a line at a time into $_
    
  6. or download this
        my $text =$text[$line];                      
        $text =~tr/\x0c-\x0d//d;
    
  7. or download this
        tr/\x0c-\x0d//d;  # strip unwanted chars from $_
    
  8. or download this
        select DOM_WORK;                             
        print "$text[$line]";                        
        close DOM_WORK;
    
  9. or download this
       print $out_fh $_;
    
  10. or download this
    use strict;
    use warnings;
    ...
    
    get_text('/usr/spool/lpd/dom/dom.work');                              
    +     
    get_domkey();