%INC is for modules, not just any files
Use 3 argument open and here-docs, example
#!/usr/bin/perl -- use strict; use warnings; use autodie; # dies if open/close... fail Main(@ARGV); exit(0); sub Main { Demo(); } sub Demo { my ( $Input, $Input2, $WantedOutput ) = DemoData(); NotDemoMeaningfulName( $Input, $Input2, \my $Output ); ... } sub DemoData { my $One = <<'__One__'; Optometrists and Opticians (simple) Regulations, Cap. 500A, RG 2 __One__ my $Two = <<'__Two__'; OPTOMETRISTS AND OPTICIANS (SIMPLE) REGULATIONS, Cap. 500A, Regulation + 2 __Two__ my $Three = <<'__Two__'; {RG 2}{Regulation 2} __Two__ return \$One, \$Two, $Three; } ## end sub DemoData sub NotDemoMeaningfulName { my ( $inputOne, $inputTwo, $outputFile ) = @_; open my ($inOne), '<', $inputOne; open my ($inTwo), '<', $inputTwo; open my ($outFh), '>', $outputFile; ...
In reply to Re: Simulate file
by Anonymous Monk
in thread Simulate file
by DreamT
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |