Hi Everyone, I am very new to perl, but came across a situation wherein I have to read a c++ header file and write the datatype, its identifier and also the length to an excel file. There can be other header files, in the directory but I should browse through the file which has only "_mef:" string in it. Once I have such a file, then I should again browse through the file to find out the native datatypes, such as int, char, short etc....and write the identifier and its length to csv file.
For example..
header.h
Then the csv file should have the output as
header.h (Name of the header file)
I would greatly appreciate if anyone can help me to achieve this.
Regards,
RB
Last edited by Scott; 05-21-2010 at 02:30 AM..
Reason: Please use code tags
HI
I need to read each line (test.txt) and store it in a array (@test)
How to do it in perl.
Suppose i have a file test.txt. I have to read each line of the test.txt file and store it in a array @test. How to do it in perl.
Regards
Harikrishna (3 Replies)
Hi,
I am new to perl.
I want to read from a file on the basis of some conditions..
I want to define parameters in a configuration file in such a manner like...
etc..
in my perl script, theer is a variable like this..
then i want to read values from first if block from the file... (1 Reply)
Hi!
I have a need to do this in Perl.
script.pl -config file
The script would be doing a wget/LWP on a URL which is defined in the config file.
So when I run the script it should return either one of these conditions -
1) OK with exit status 0.
Should also print "wget URL"
2)... (6 Replies)
Need perl script, data file will be csv format.
I have text file contains 2 colums.
Filename Foldernumber
aaaa 13455
bbbb 23465
cccc 26689
I have two location 1. files present and 2. folders present. I need to search for file and folder if folder... (3 Replies)
This is one of the strangest things that's happening to me.
I'm writing a new Perl script that is trying to read a file.
The file is originally in .mof format, but I also saved the contents into a .txt file.
As a simple test, I wrote this:
#!/user/bin/perl -w
use strict;
... (3 Replies)
If a form's action is the following Perl script how do I make it print the entire contents of the file on the screen?
if(param())
{
my $uploadedFile = param('file');#in the html page 'file' is the value of the name attribute of the input
my $fh = upload($uploadedFile);
... (1 Reply)
Hi,
i need a perl script which reads the file, content is given below. and output in new file.
TARGET DRIVE IO1 IO2 IO3 IO4 IO5
------------ --------- --------- --------- --------- ---------
0a.1.8 266 236 ... (3 Replies)
Good morning, I appreciate any assistance that I can get from the monks out there. I am able to get this to work for me so that I can do a hostname lookup if I only specify one hostname in the script. What I want to do is have a file with hostnames and do lookups for each name in the file. Here is... (1 Reply)
I have a file abc.ini and declared many variables in that file, one of the variable(DBname) value I am trying to read in my perl script but getting error.
File abc.ini content
# database name
DBname =UATBOX
my $ex_stat;
my $cmd_output;
$ex_stat = "\Qawk '/^DBname/{print... (2 Replies)
Discussion started by: Devesh5683
2 Replies
LEARN ABOUT BSD
syserrlst
SYSERRLST(5) File Formats Manual SYSERRLST(5)NAME
syserrlst - error message file format
DESCRIPTION mkerrlst(1), creates error message files in the format described below.
An ``error message file'' consists of a header, an array of structures specifying the offset and length of each message, and the array of
message strings separated by newlines.
The message strings are separated by newlines but the newline characters are not included in the size of the message. These newline char-
acters serve only to make the file editable or printable (after stripping off the header).
The file format is:
/*
* Definitions used by the 'mkerrlst' program which creates error message
* files.
*
* The format of the file created is:
*
* struct ERRLSTHDR ehdr;
* struct ERRLST emsg[num_of_messages];
* struct {
* char msg[] = "error message string";
* char lf = '0;
* } [num_of_messages];
*
* Note: the newlines are NOT included in the message lengths, the newlines
* are present to make it easy to 'cat' or 'vi' the file.
*/
struct ERRLSTHDR
{
short magic;
short maxmsgnum;
short maxmsglen;
short pad[5]; /* Reserved */
};
struct ERRLST
{
off_t offmsg;
short lenmsg;
};
#define ERRMAGIC 012345
SEE ALSO mkerrlst(1), syserrlst(3)BUGS
Format of the file isn't necessarily portable between machines.
HISTORY
This file format is new with 2.11BSD.
3rd Berkeley Distribution March 7, 1996 SYSERRLST(5)