... operate with only file locations ... not ... texts of file in program ...
Opening files for reading in the "normal" way (as opposed to the ramdisk-ish approach used for convenience in the example code) is straightforward and is well described in the open and perlopentut docs. Maybe also take a look at Files and I/O in perlintro.
... print the output in other file.
This merely involves opening a write filehandle (see docs referred to above) inside the Perl script and print-ing to this filehandle rather than to STDOUT by default, or else redirecting standard output from the Perl script as a whole to a file via the OS command line (see your OS docs regarding I/O redirection).
Update: Minor wording changes to (hopefully) enhance clarity.
Give a man a fish: <%-{-{-{-<
In reply to Re^6: partial matching of lines in perl
by AnomalousMonk
in thread partial matching of lines in perl
by Sidd@786
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |