Hi All
I have the following contents in a file say in a file name called 'FILE1'
*********** Start of the file **************
SANDIO000456GROJ8900
SANDIO2338923GRJH900
*********** End of the file *******************
I want to cut the first line which has the characters.... (6 Replies)
Hi,
I have the following data in a flat file:
abcd_efgh_ijkl_20080522.dat|20080602222508|1357
abcd_efgh_ijkl_20080522.dat|20080602222508|1357
abcd_efgh_ijkl_20080522.dat|20080602222508|1357
I need to check the no. of occurence of "|" (pipe) on each line and the output should look like below:... (4 Replies)
Hi,
I have to search and count unique occurence of DE numbers in bold below in a file which has content like below.
Proc Tran F-BUY
Item Tkey Q5JV
Item Tsid JTIZ9
Item Tdat 20091001
Item Tset 20091001
Item Tbkr 5
Item Tshs 2
Item Tprc 897.0
Item Tcom 2000.0
Item Tcm1 20091001... (6 Replies)
Guys -
Need your ideas on a section of code to finish something up. To make a long story short, I'm parsing a print output file that goes to pre-printed forms. I'm intercepting it, parsing it, formatting it, cutting it up into individual pages, grabbing the text I want in zones, building an... (3 Replies)
Hello,
I have a dictionary which I am building for the Open Source Community. The data structure is as under
HEADWORD=PARTOFSPEECH=ENGLISH MEANING
as shown in the example below
अ=m=Prefix signifying negation.
अँहँ=ind=Interjection expressing disapprobation.
अं=int=An interjection... (2 Replies)
Hi,
I have a huge unsorted text file. We wanted to identify the unique field values in a line and consider those fields as a primary key for a table in upstream system.
Basically, the process or script should fetch the values from each line that are unique compared to the rest of the lines in... (13 Replies)
Hi,
Sure it's an easy one, but it drives me insane.
input ("|" separated):
1|A,B,C,A
2|A,D,D
3|A,B,B
I would like to count the occurence of each capital letters in $2 across the entire file, knowing that duplicates in each record count as 1.
I am trying to get this output... (5 Replies)
Hello.
Here is a file contents :
declare -Ax NEW_FORCE_IGNORE_ARRAY=(="§" ="§" ="§" ="§" ="§" .................. ="§"Here is a pattern
=I want to extract 'NEW_FORCE_IGNORE_ARRAY' which is the whole word before the first occurrence of pattern '='
Is there a better solution than mine :... (3 Replies)
Discussion started by: jcdole
3 Replies
LEARN ABOUT DEBIAN
set::infinite::_recurrence
Set::Infinite::_recurrence(3pm) User Contributed Perl Documentation Set::Infinite::_recurrence(3pm)NAME
Set::Infinite::_recurrence - Extends Set::Infinite with recurrence functions
SYNOPSIS
$recurrence = $base_set->_recurrence ( &next, &previous );
DESCRIPTION
This is an internal class used by the DateTime::Set module. The API is subject to change.
It provides all functionality provided by Set::Infinite, plus the ability to define recurrences with arbitrary objects, such as dates.
METHODS
o _recurrence ( &next, &previous )
Creates a recurrence set. The set is defined inside a 'base set'.
$recurrence = $base_set->_recurrence ( &next, &previous );
The recurrence functions take one argument, and return the 'next' or the 'previous' occurence.
Example: defines the set of all 'integer numbers':
use strict;
use Set::Infinite::_recurrence;
use POSIX qw(floor);
# define the recurrence span
my $forever = Set::Infinite::_recurrence->new(
Set::Infinite::_recurrence::NEG_INFINITY,
Set::Infinite::_recurrence::INFINITY
);
my $recurrence = $forever->_recurrence(
sub { # next
floor( $_[0] + 1 )
},
sub { # previous
my $tmp = floor( $_[0] );
$tmp < $_[0] ? $tmp : $_[0] - 1
},
);
print "sample recurrence ",
$recurrence->intersection( -5, 5 ), "
";
# sample recurrence -5,-4,-3,-2,-1,0,1,2,3,4,5
{
my $x = 234.567;
print "next occurence after $x = ",
$recurrence->{param}[0]->( $x ), "
"; # 235
print "previous occurence before $x = ",
$recurrence->{param}[2]->( $x ), "
"; # 234
}
{
my $x = 234;
print "next occurence after $x = ",
$recurrence->{param}[0]->( $x ), "
"; # 235
print "previous occurence before $x = ",
$recurrence->{param}[2]->( $x ), "
"; # 233
}
o is_forever
Returns true if the set is a single span, ranging from -Infinity to Infinity.
o _is_recurrence
Returns true if the set is an unbounded recurrence, ranging from -Infinity to Infinity.
CONSTANTS
o INFINITY
The "Infinity" value.
o NEG_INFINITY
The "-Infinity" value.
SUPPORT
Support is offered through the "datetime@perl.org" mailing list.
Please report bugs using rt.cpan.org
AUTHOR
Flavio Soibelmann Glock <fglock@gmail.com>
The recurrence generation algorithm is based on an idea from Dave Rolsky.
COPYRIGHT
Copyright (c) 2003 Flavio Soibelmann Glock. All rights reserved. This program is free software; you can distribute it and/or modify it
under the same terms as Perl itself.
The full text of the license can be found in the LICENSE file included with this module.
SEE ALSO
Set::Infinite
DateTime::Set
For details on the Perl DateTime Suite project please see <http://datetime.perl.org>.
perl v5.12.4 2011-08-22 Set::Infinite::_recurrence(3pm)