i have textfiles that contain a series of lines that look like this:
string0 .................................................... column3a column4a
string1**384y0439 ..................................... column3b column4b... (2 Replies)
Input file is on Linux box and the input file has data in just one line with 1699741696 characters.
Sample Input:
<xxx><document coll="uspatfull" version="0"><CMSdoc>xxxantivirus</CMSdoc><tag1>1</tag1></document><document coll="uspatfull"... (5 Replies)
Hi there,
Can you help. I need to extract data based on the list file(list.txt) from item.txt as shown below. Please note the actual files are enormous in size. Thank you.
item.txt
nokia1100 123,000
nokia2100 66,000
samsung123 11,000
samsung456 23,000
iphone432 234,000... (12 Replies)
I have a tab delimited text file where the first column can take on three different values : 100, 150, 250. I want to extract all the rows where the first column is 100 and put them into a separate text file and so on. This is what my text file looks like now:
100 rs3794811 0.01 0.3434... (1 Reply)
I have a tab delimited text file where the first column can take on three different values : 100, 150, 250. I want to extract all the rows where the first column is 100 and put them into a separate text file and so on. This is what my text file looks like now:
100 rs3794811 0.01 0.3434
100... (1 Reply)
I have a .kml file. So I want filter the .kml to get only the tags that have this numeric codes that they are in a text file
11951
11952
74014
11964
11965
11969
11970
11971
11972
60149
74018
74023
86378
11976
11980
11983
11984
11987 (5 Replies)
Hi experts,
I need a help in extracting a set of patterns from the text file.
Below is my scenario.
Input file:
I need to extract the data between
My output should be as
Thanks,
Kalai (7 Replies)
Hi,
I am trying to extract lines from a text file given a text file containing line numbers to be extracted from the first file. How do I go about doing this? Thanks! (1 Reply)
Dear All,
I have two files but want to extract data from one based on another... can you please help me
file 1
David
Tom
Ellen
and file 2
David|0010|testnamez|resultsz
David|0004|testnamex|resultsx
Tom|0010|testnamez|resultsz
Tom|0004|testnamex|resultsx
Ellen|0010|testnamez|resultsz... (12 Replies)
Discussion started by: A-V
12 Replies
LEARN ABOUT DEBIAN
file::queue
File::Queue(3pm) User Contributed Perl Documentation File::Queue(3pm)NAME
File::Queue - Persistent FIFO queue implemented in pure perl!
SYNOPSIS
use strict; # always!
use File::Queue;
my $q = new File::Queue (File => '/var/spool/yourprog/queue');
$q->enq('some flat text1');
$q->enq('some flat text2');
$q->enq('some flat text3');
# Get up to first 10 elements
my $contents = $q->peek(10);
my $elem1 = $q->deq();
my $elem2 = $q->deq();
# empty the queue
$q->reset();
DESCRIPTION
This module allows for the creation of persistent FIFO queue objects.
File::Queue only handles scalars as queue elements. If you want to work with references, serialize them first!
The module was written with speed in mind, and it is very fast, but it should be used with care. Please refer to the CAVEATS section.
Interface
File::Queue implements a OO interface. The object methods and parameters are described below.
Methods
File::Queue supports all of the queue-related functions a developer should expect.
o new()
Instantiates your File::Queue object. Parameters are described in the next sub-section.
o enq()
Enqueues a string element to the queue.
o deq()
Dequeues a string element from the queue, and returns the element. If the queue is empty, nothing is returned.
o peek(n)
Returns an arrayref containing the next n elements in the queue. If the queue size is less than n, all elements are returned. If the
queue is empty, an empty arrayref is returned.
o reset()
Emptys the queue.
o close()
Closes the filehandles belonging to the queue object ('.dat' and '.idx').
o delete()
Deletes the files belonging to the queue object ('.dat' and '.idx').
Parameters
There are a number of parameters that can be passed when constructing your File::Queue objects. Parameters are case-insensitive.
o File (required)
File::Queue creates two files using this parameter as the base. In the case of the example in the SYNOPSIS, the two files are
'/var/spool/yourprog/queue.dat' and '/var/spool/yourprog.idx'.
The '.dat' file holds all of the data, the '.idx' file holds the byte index (pointer) of the starting point of the first element in the
queue.
o Mode (optional)
The file bit mode to be shared by both the '.dat' and '.idx' files. Defaults to '0600'.
o Seperator (optional)
The character or byte sequence that is used to seperate queue elements in the '.dat' file. It should be something you can guarantee
will NEVER appear in your queue data. Defaults to the newline character.
o BlockSize (optional)
This is the size of the byte chunks that are pulled at each iteration when checking for the end of a queued element. Defaults to 64,
which will be fine for most cases, but can be tweaked or tuned for your specific case to squeeze out a few extra nanoseconds.
CAVEATS
This module should never be used in situations where the queue is not expected to become empty.
The '.dat' file is not truncated (emptied) until the queue is empty.
Even the data you've already dequeued remains in the '.dat' file until the queue is empty.
If you keep enqueueing elements and never FULLY dequeue everything, eventually your disk will fill up!
SEE ALSO
Tie::File
AUTHOR
Jason Lavold <jlavold [ at ] gmail.com>
perl v5.10.0 2008-12-22 File::Queue(3pm)