Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer

Re^6: partial matching of lines in perl

by AnomalousMonk (Bishop)
on Jun 15, 2020 at 11:05 UTC ( #11118087=note: print w/replies, xml ) Need Help??

in reply to Re^5: partial matching of lines in perl
in thread partial matching of lines in perl

... 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:  <%-{-{-{-<

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://11118087]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (4)
As of 2020-10-01 17:26 GMT
Find Nodes?
    Voting Booth?
    My favourite web site is:

    Results (17 votes). Check out past polls.