clx and mjf,
Note that $1 in a and the discussion in the referenced thread provide a test for exact matches, but $1 ~ /COMS|SMAS|MARC/ is testing for substring matches. In other words, if the first field in the input contains the substring COMS or the substring SMAS or the substring MARC, it will match even if it is not one of those three exact strings.
To get what was requested here, we would need something more like:
Note that the close() is needed because since it is performing a substring match, even if there are only three lines in client_list, there could be thousands of output files created.
Of course, it is entirely possible that ROCK_PLSQL wants exact matches, but that is not what the code supplied in post #1 in this thread does.
This User Gave Thanks to Don Cragun For This Post:
Hi
I have 2 files:-
1. List of files which consists of names of some output files.
2. A delimited file; delimted by "|"
I want to replace the value of the $23 (23rd column) in the delimited file with name in the first file. It is always position to position. Meaning first row of the first... (5 Replies)
Hi all,
I have 2 files. One contains only 1 column and other one contains 2 columns, let say 1_col.txt and 2_col.txt respectively. Here, I will try to explain with an example.
Input files :
1_col.txt 2_col.txt
a a b
x a c
p ... (5 Replies)
- I have two files (File 1 and File 2) and the contents of the files are mentioned below.
- I am trying to compare the values of Column1 of File1 with Column1 of File2. If a match is found, print the corresponding value from Column2 of File1 in Column5 of File2.
- I tried to modify and use... (10 Replies)
Hi
I have a file which has values in each line:
MP304,d40000
MP310,ff0000
etc
I have another file which as the first value in it and is unique in the file(not repeated). I need to replace a string with the second value above. The second file contents is as follows:(snippet)
<g
... (12 Replies)
Hi,
I have 2 input files:
File 1:
echo Name > create_Name.txt
echo Group /dir/group, Name >> create_Name.txt
File 2:
Name AAA BBB CCC
group A B C
dir A1 B1 C1
................................
Need to replace the contents of File 1 with column 2, 3 & 4 values of File 2... (8 Replies)
I have a file containing multiple values, some of them are pipe separated which are to be read as separate values and some of them are single value all are these need to store in variables.
I need to read this file which is an input to my script
Config.txt
file name, first path, second... (7 Replies)
Hi,
I want to replace a chain of if-else statement in an old AWK file with values from Db2 table or CSV file. The part of code is below...
if (start_new_rec=="true"){
exclude_user="false";
user=toupper($6);
match(user, "XXXXX.");
if (RSTART ==2 ) {
... (9 Replies)
hi guys, i want help... Reding XML file and print the values into the text file using linux shell script file as per below xml file
<sequence>
<Filename>aldorzum.doc</Filename>
<DivisionCode>US</DivisionCode>
<ContentType>Template</ContentType>
<ProductCode>VIMZIM</ProductCode>
</sequence>... (4 Replies)
Hi,
I have two files with values in both.
File1:
cat 2 3
dog 4 5
elephant 6 7
camel 2 3
File2:
----+--gkf;ajf=
---+----
+----- cat -------=----+ 3 | 4 ----- dog ------++-- 5 | 9 ----++-- elephant |
5 | 7
---++ camel ------ ++++_---- || 8 | 9
I want the final file as:
cat 4... (1 Reply)
Discussion started by: npatwardhan
1 Replies
LEARN ABOUT DEBIAN
marc::charset::table
MARC::Charset::Table(3pm) User Contributed Perl Documentation MARC::Charset::Table(3pm)NAME
MARC::Charset::Table - character mapping db
SYNOPSIS
use MARC::Charset::Table;
use MARC::Charset::Constants qw(:all);
# create the table object
my $table = MARC::Charset::Table->new();
# get a code using the marc8 character set code and the character
my $code = $table->lookup_by_marc8(CYRILLIC_BASIC, 'K');
# get a code using the utf8 value
$code = $table->lookup_by_utf8(chr(0x043A));
DESCRIPTION
MARC::Charset::Table is a wrapper around the character mapping database, which is implemented as a tied hash on disk. This database gets
generated by Makefile.PL on installation of MARC::Charset using MARC::Charset::Compiler.
The database is essentially a key/value mapping where a key is a MARC-8 character set code + a MARC-8 character, or an integer representing
the UCS code point. These keys map to a serialized MARC::Charset::Code object.
new()
The consturctor.
add_code()
Add a MARC::Charset::Code to the table.
get_code()
Retrieve a code using a hash key.
lookup_by_marc8()
Looks up MARC::Charset::Code entry using a character set code and a MARC-8 value.
use MARC::Charset::Constants qw(HEBREW);
$code = $table->lookup_by_marc8(HEBREW, chr(0x60));
lookup_by_utf8()
Looks up a MARC::Charset::Code object using a utf8 value.
db()
Returns a reference to a tied character database. MARC::Charset::Table wraps access to the db, but you can get at it if you want.
db_path()
Returns the path to the character encoding database. Can be called statically too:
print MARC::Charset::Table->db_path();
brand_new()
An alternate constructor which removes the existing database and starts afresh. Be careful with this one, it's really only used on
MARC::Charset installation.
perl v5.12.4 2010-09-09 MARC::Charset::Table(3pm)