Help for this page

Select Code to Download


  1. or download this
    my $var_one;
    sub copy_file {
    ...
    }
    
    copy_file();
    
  2. or download this
    my $var_one;
    sub copy_file {
    ...
      while($x = <IFILE>) {$x =~ s|(\$\w+)|$1|eeg; print $x};
      close(IFILE);
    }
    
  3. or download this
    my $var_one;
    sub copy_file {
      my $x = "<p>The variable is $var_one.</p>";
      $x =~ s|(\$\w+)|$1|eeg; print $x;
    }
    
  4. or download this
    sub copy_file {
      open(IFILE, "<afile");
      while($x = <IFILE>) {$x =~ s|(\$\w+)|$1|eg; print $x};
      close(IFILE);
    }