file - Traversing through .gz in perl -


I want to go through the .gz file and read the contents of the file.

My folder structure: 1) ABC. GG 1.1) ABC 1.1.1) Sample 1. txt 1.1.2) Sample 2.txt 1.1.3) Test 1.txt

I wanted to go through .gz, then read the content and printed it Sample test * .txt file test * .ttt should be ignored. Importantly, I do not want to copy / remove Jazz at a different place.

I want to read the file in Perl script:

  Use strict; Use warnings; My $ filename = 'Sample1.txt'; Open (my $ FH, '& lt ;: encoding (UTF-8)', $ filename) or dead file "$ $ $ could not be opened!"; While (my $ line =  

The second issue is that you have to decompress it, in memory or in a temporary file

You definitely will not be able to read the line through the line.

Look for compressed files and tar archives.

Comments

Popular posts from this blog

c - Mpirun hangs when mpi send and recieve is put in a loop -

python - Apply coupon to a customer's subscription based on non-stripe related actions on the site -

java - Unable to get JDBC connection in Spring application to MySQL -