Folks,
I have a bit of an issue trying to obtain some data from a csv file using PERL. I can sort the file and remove any duplicates leaving only 4 or 5 rows containing data. My problem is that the data contained in the original file contains a lot more columns and when I try ro run this script... (13 Replies)
Dear All,
I have a comma-separated file.
1. The first line of the file(header) should have 4 commas(5 fields).
2. The last line of the file should have 1 comma(2 fields).
Pls help me in checking this condition in a shell script.
And the number of lines between the first line and last... (11 Replies)
Hi All,
Im having a file named logserver.txt. I want a perl script to take a backup of that file, along with the datestamp; move the file to a different location or empty the contents of the file after backup.
Remember, the file gets generated when the related service starts. My condition is... (14 Replies)
hi all,
i am facing this problem ,please help.
suppose a file contains conetnts as below:
john itemspurchased/date
john itempurchased/date
james itempurchased/date
john items purchsed/date
so here i want to store john only once in a variable but retreive his 3... (5 Replies)
Hi
My requirement is to read the contents of a fixed length file and validate the same.
But am not able to read the contents of the file and when i tried it to print i get <blank> as an output...
I used the below satatements for printing the contents
... (3 Replies)
Hi,
I'm trying to read the contents of a file (message.txt), put them in a mail and then mail it
This is what I have thus far but I having trouble referencing the file. I'm trying to put it into an array so any ideas would be helpful ...
$to='user.n@domain.com';
$from= 'username';... (7 Replies)
I am looking to create a perl script which will take numbers from a simple text file, convert them from decimal to hex, and then rewrite those values in the file or create a new file with the hex numbers(whichever's easier).
My text document for example would be something as simple as
1312... (6 Replies)
Hi,
I want to split/parse certain bits of the hex data into another field.
Example:
Input data is
Word1: 4f72abfd
Output:
Parse bits (5 to 0) into field word1data1=0x00cd=205 decimal
Parse bits (7 to 6) into field word1data2=0x000c=12 decimal
etc.
Word2: efff3d02
Parse bits (13 to... (1 Reply)
I have an input file attached that I am trying to parse in tab-delimanted format:
The chromosomal variant column contains all the information:
parse rules:
1. 4 zeros after the NC_ and the digits before the .
2. digits after the g. repeated twice separated by a tab
3. letter before the >
4.... (10 Replies)
Below is a perl code I am trying.
#!/usr/bin/perl
#use strict;
use warnings qw/ all FATAL /;
use constant ENV_FILE => '/apps/env_data.txt';
$uenv = $ARGV;
my $input = $uenv;
open my $fh, '<', ENV_FILE
or die sprintf qq{Unable to open "%s" for input: $!}, ENV_FILE;
... (2 Replies)