Hi ,
I have a file with contents as below:
Contract Cancellation Report UARCNCL
LOS CODE DATE REAS TYPE AMOUNT AMOUNT LETTER BY
========= ======= ==== ==== ==== ========= ==== ====
8174739 7641509 1S NONE CRCD 30-JUN-2008 NPAR N .00 .00 CCAN
8678696 8091709 1S NONE DDEB 30-JUN-2008... (14 Replies)
hi all,
i have a select query that gives me the output in the following way...
SYSTYPE
--------------------------------------------------------------------------------
Success Failures Total RFT
---------- ---------- ---------- ----------
TYP
1 0 ... (3 Replies)
How to convert entries in a text file to values in a string?
ex: I have a text file list.txt with following entries :
aaaa
bbbb
cccc
dddd
I want to move the values in the list.txt file to an array (names)
need a small script to do that?
Thanks for your help in advance (3 Replies)
hi...... thanks for allowing me to start a discussion
i am collecting usb usage details of all users and convert it into csv files so that i can export it into some database..
the input text file is as follows:-
USB History Dump
by nabiy (c)2008
(1) --- Kingston DataTraveler 130 USB... (2 Replies)
Hi
I have a requirement to write a script but not sure which is the best way to approach this
I have not worked in sed but I'm aware that its robust for file extraction requirements
I have a scripting task. I already developed the code in perl but the script is taking almost 2 mins for... (5 Replies)
I want to extract IP address, system ID and engine IDs of this file ( marked in red) and put in a csv. E.g.
1.1.1.1, SYSTEMID, 000012345678981123548912
I get these file by running an expect script from solaris.
Here is the text file output of my expect script.
working on 1.1.1.1
SNMP... (5 Replies)
Hi all,
I need to find a way to convert excel file into csv or a text file in linux command. The reason is I have hundreds of files to convert. Another complication is the I need to delete the first 5 lines of the excel file before conversion.
so for instance
input.xls
description of... (6 Replies)
Hi guys,
I have a text file named file1.txt that is formatted like this:
001 , ID , 20000
002 , Name , Brandon
003 , Phone_Number , 616-234-1999
004 , SSNumber , 234-23-234
005 , Model , Toyota
007 , Engine ,V8
008 , GPS , OFF
and I have file2.txt formatted like this:
... (2 Replies)
Hello,
I was working with Machine learning and would like to apply my regression algorithms on binary classification datasets.
So I came across this adult dataset, LIBSVM Data: Classification (Binary Class)
It is a binary dataset, features have values only 1 and 0.
and I wanted to... (4 Replies)
I have input data looks like this which is a part of a csv file
7,1265,76548,"0102:04"
8,1266,76545,"0112:04"
I need to make the output data should look like this and the output data will be part of text file:
7|1265000 |7654899 |A|
8|12660000 |76545999 |B|
The logic behind the... (6 Replies)
Discussion started by: RJG
6 Replies
LEARN ABOUT MOJAVE
bytes5.18
bytes(3pm) Perl Programmers Reference Guide bytes(3pm)NAME
bytes - Perl pragma to force byte semantics rather than character semantics
NOTICE
This pragma reflects early attempts to incorporate Unicode into perl and has since been superseded. It breaks encapsulation (i.e. it
exposes the innards of how the perl executable currently happens to store a string), and use of this module for anything other than
debugging purposes is strongly discouraged. If you feel that the functions here within might be useful for your application, this possibly
indicates a mismatch between your mental model of Perl Unicode and the current reality. In that case, you may wish to read some of the perl
Unicode documentation: perluniintro, perlunitut, perlunifaq and perlunicode.
SYNOPSIS
use bytes;
... chr(...); # or bytes::chr
... index(...); # or bytes::index
... length(...); # or bytes::length
... ord(...); # or bytes::ord
... rindex(...); # or bytes::rindex
... substr(...); # or bytes::substr
no bytes;
DESCRIPTION
The "use bytes" pragma disables character semantics for the rest of the lexical scope in which it appears. "no bytes" can be used to
reverse the effect of "use bytes" within the current lexical scope.
Perl normally assumes character semantics in the presence of character data (i.e. data that has come from a source that has been marked as
being of a particular character encoding). When "use bytes" is in effect, the encoding is temporarily ignored, and each string is treated
as a series of bytes.
As an example, when Perl sees "$x = chr(400)", it encodes the character in UTF-8 and stores it in $x. Then it is marked as character data,
so, for instance, "length $x" returns 1. However, in the scope of the "bytes" pragma, $x is treated as a series of bytes - the bytes that
make up the UTF8 encoding - and "length $x" returns 2:
$x = chr(400);
print "Length is ", length $x, "
"; # "Length is 1"
printf "Contents are %vd
", $x; # "Contents are 400"
{
use bytes; # or "require bytes; bytes::length()"
print "Length is ", length $x, "
"; # "Length is 2"
printf "Contents are %vd
", $x; # "Contents are 198.144"
}
chr(), ord(), substr(), index() and rindex() behave similarly.
For more on the implications and differences between character semantics and byte semantics, see perluniintro and perlunicode.
LIMITATIONS
bytes::substr() does not work as an lvalue().
SEE ALSO
perluniintro, perlunicode, utf8
perl v5.18.2 2013-11-04 bytes(3pm)