-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Wagner, David --- Senior Programmer Analyst --- CFS wrote:
> I have an Excel file that I am copying from a Windows server to Linux
> box(initially). I then extract each worksheet to their own csv. Within the
> Excel is detail that is contained
From: "Wagner, David --- Senior Programmer Analyst --- CFS"
> I have an Excel file that I am copying from a Windows server to Linux
> box(initially). I then extract each worksheet to their own csv. Within
> the Excel is detail that is contained within a Access DB. I am getting
> the necessa
I have an Excel file that I am copying from a Windows server to Linux
box(initially). I then extract each worksheet to their own csv. Within the
Excel is detail that is contained within a Access DB. I am getting the
necessary worksheets out ok, but am unsure how or if one can extract to
lto:[EMAIL PROTECTED]
Sent: Tuesday, March 25, 2008 1:02 PM
To: 'Chas. Owens'
Cc: 'Perl Beginners'
Subject: RE: Info from flat file
Chas,
I have a question on this. Will the pattern $/ used considered for other
opened files also? I was trying to match the IP with ip-host file an
:02 PM
To: 'Chas. Owens'
Cc: 'Perl Beginners'
Subject: RE: Info from flat file
Chas,
I have a question on this. Will the pattern $/ used considered for other
opened files also? I was trying to match the IP with ip-host file and
considering the whole ip-host text file as single li
On Tue, Mar 25, 2008 at 3:32 AM, Manoj <[EMAIL PROTECTED]> wrote:
> Chas,
>
> I have a question on this. Will the pattern $/ used considered for other
> opened files also? I was trying to match the IP with ip-host file and
> considering the whole ip-host text file as single line even though ther
Message-
From: Chas. Owens [mailto:[EMAIL PROTECTED]
Sent: Sunday, March 16, 2008 4:06 AM
To: Manoj
Cc: Perl Beginners
Subject: Re: Info from flat file
On Fri, Mar 14, 2008 at 3:33 PM, Manoj <[EMAIL PROTECTED]> wrote:
> I have a log file like this. The part between += are almost sim
Thanks Chas. Working on this now...digging as much I can and updating some
thing new.
-Original Message-
From: Chas. Owens [mailto:[EMAIL PROTECTED]
Sent: Sunday, March 16, 2008 4:06 AM
To: Manoj
Cc: Perl Beginners
Subject: Re: Info from flat file
On Fri, Mar 14, 2008 at 3:33 PM
On Fri, Mar 14, 2008 at 3:33 PM, Manoj <[EMAIL PROTECTED]> wrote:
> I have a log file like this. The part between += are almost similar from
> which I need to fetch for IP Address and Connection time only for domain
> perl.com. The perl.com domain may scattered in log. The main intension of my
>
I have a log file like this. The part between += are almost similar from
which I need to fetch for IP Address and Connection time only for domain
perl.com. The perl.com domain may scattered in log. The main intension of my
work is that this log keeps a record of the users who visits websites. I
hav
On Sep 7, 6:11 pm, [EMAIL PROTECTED] (Tom Phoenix) wrote:
> On 9/6/07, Satya <[EMAIL PROTECTED]> wrote:
>
> > If it is possible to do it using the perl, what would be the approach.
>
> I recommend designing an algorithm, then writing Perl code to
> implement it. Perhaps a main loop should read the
On 9/6/07, Satya <[EMAIL PROTECTED]> wrote:
> If it is possible to do it using the perl, what would be the approach.
I recommend designing an algorithm, then writing Perl code to
implement it. Perhaps a main loop should read the data, process it,
and write it out to the new file. Have you written
HI All,
I need to generate a flat file. I want to know if i an make use of
perl.
My program reads flat file as input , does some validations based on
defined rules and gives back the output as a flat file. The flat file
is CSV.
The CSV in turn contains large number of claims . Each claim will
Rob Dixon wrote:
> Saravana Kumar wrote:
> > John W. Krahn wrote:
> >
> >>Saravana Kumar wrote:
> >>
> >>>I am new to the list and newbie in perl.
> >>>
> >>>I have a big flat file(100G). The file was supposed to be in
Saravana Kumar schreef:
> Since it is creating
> a new file i was wondering whether i can do the changes in the same
> file ie., read 1000 characters, do the replacement and write the
> output to the same file. This will reduce the disk space used(since
> the file i have is 100G).
Just change you
Saravana Kumar wrote:
> John W. Krahn wrote:
>
>>You can do what you want if you set the Input Record Separator to read
>>1000 bytes at a time:
>>
>>$/ = \1000;
>>while ( ) {
>>s/[[:cntrl:]]/ /g;
>>print "$_\n";
>>}
>
> Thanks John. That did the trick. I ran the above script with my
Saravana Kumar wrote:
> John W. Krahn wrote:
>
>>Saravana Kumar wrote:
>>
>>>I am new to the list and newbie in perl.
>>>
>>>I have a big flat file(100G). The file was supposed to be in a single
>>>line but many of records(as it has ^M). Ther
John W. Krahn wrote:
> Saravana Kumar wrote:
>> Hi,
>
> Hello,
>
>> I am new to the list and newbie in perl.
>>
>> I have a big flat file(100G). The file was supposed to be in a single
>> line but many of records(as it has ^M). There are also ^@ and
Saravana Kumar wrote:
> Hi,
Hello,
> I am new to the list and newbie in perl.
>
> I have a big flat file(100G). The file was supposed to be in a single line
> but many of records(as it has ^M). There are also ^@ and tabs in between.
>
> I want to first replace the contro
Hi,
I am new to the list and newbie in perl.
I have a big flat file(100G). The file was supposed to be in a single line
but many of records(as it has ^M). There are also ^@ and tabs in between.
I want to first replace the control characters and tabs with space.
I tried this s/[[:cntrl:]\t]/ /g
language so I dont know whether this thing
can be done by tht or not)
I want this thing in this manner as I have to make sure the particular
character (better say the delimiter which I am using in my flat file is
not present there,in database, already ).
I think I have cleared each
On Oct 7, Dave Thacker said:
Given this test file.
--start-
this
is
my file
end--
I want to skip the blank lines and just print the lines with text, like this
When you say "blank", do you mean lines with NO characters at all (other
than the ending newline) or lin
> -Original Message-
> From: Dave Thacker [mailto:[EMAIL PROTECTED]
> Sent: Friday, October 07, 2005 07:05
> To: beginners@perl.org
> Subject: Skipping blank lines while reading a flat file.
>
>
> Perl 5.6 on linux
>
> Given this test file.
> --
Dave Thacker wrote:
> Perl 5.6 on linux
>
> Given this test file.
> --start-
> this
>
> is
>
> my file
> end--
> I want to skip the blank lines and just print the lines with text, like this
> this
> is
> myfile
>
> This is my test case code.
> #!/usr/bin/perl -w
>
Dave,
(this is one I know :-) )
I want to skip the blank lines and just print the lines with text, like this
this
is
myfile
This is my test case code.
#!/usr/bin/perl -w
use strict;
my $opt_testfile="test-text.txt";
open (TS, $opt_testfile) or die "can't open file";
while () {
chomp;
Perl 5.6 on linux
Given this test file.
--start-
this
is
my file
end--
I want to skip the blank lines and just print the lines with text, like this
this
is
myfile
This is my test case code.
#!/usr/bin/perl -w
use strict;
my $opt_testfile="test-text.txt";
open (TS
From: Patricia Hinman <[EMAIL PROTECTED]>
> I just wrote a script that reads yahoo directories,
> and writes to a temp txt file the portion of
> direcetories it's currently working with. Then copies
> that temp file to a completed log file, and grabs the
> next subcatagory to wo
Hi everyone,
I just wrote a script that reads yahoo directories,
and writes to a temp txt file the portion of
direcetories it's currently working with. Then copies
that temp file to a completed log file, and grabs the
next subcatagory to work with. It continues till no
more urls are given to fe
On Wednesday, July 17, 2002, at 07:04 , George Schlossnagle wrote:
>>> The main problem appears to be that instead of taking a different branch
>>> if open() or flock() fails you continue on as if they had succeeded.
>
> flock($fh,LOCK_EX ) is a blocking call, so it won't return until the lock
nt and will cease to exist as soon as
it's closed.
Jeff, you have to use a separate lock file.
Or even better, consider using something else than a flat file
operated by your own code.
DB_File as an array, DBD::SQLite, DBD::File, DBD::CSV, ... there are
many options.
Jenda
=== [EMAI
>> The main problem appears to be that instead of taking a different
>> branch
>> if open() or flock() fails you continue on as if they had succeeded.
flock($fh,LOCK_EX ) is a blocking call, so it won't return until the
lock is available.
// George Schlossnagle
// Principal Consultant
// Omni
"John W. Krahn" wrote:
>
> Jeff wrote:
> >
> > From: John W. Krahn [mailto:[EMAIL PROTECTED]]
> > >
> > > Jeff wrote:
> > > >
> > > > I'm use flat files to manage a list containing approx 25,000 records. For
> > > > updates, I write to a temp file then unlink main and rename temp file to
> > > >
Jeff wrote:
>
> From: John W. Krahn [mailto:[EMAIL PROTECTED]]
> >
> > Jeff wrote:
> > >
> > > I'm use flat files to manage a list containing approx 25,000 records. For
> > > updates, I write to a temp file then unlink main and rename temp file to
> > > main. I use flock for both temp and main
_);
> next unless $name eq $update;
> $new_location = "palm_bay";
> $_ = join( "|", $name, $team, $new_location);
> }
> continue {
> print OUT $_ or print "Error writing $tmp_db: $!\n";
> }
> close IN;
> close OUT;
>
t;;
}
-Original Message-
From: John W. Krahn [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, July 17, 2002 8:11 PM
To: [EMAIL PROTECTED]
Subject: Re: Flat File Db
Jeff wrote:
>
> I'm use flat files to manage a list containing approx 25,000 records. For
> updates, I write to a temp
Jeff wrote:
>
> I'm use flat files to manage a list containing approx 25,000 records. For
> updates, I write to a temp file then unlink main and rename temp file to
> main. I use flock for both temp and main files during update. My main file
> gets blown away on occasions. What gives? I can'
I'm use flat files to manage a list containing approx 25,000 records. For
updates, I write to a temp file then unlink main and rename temp file to
main. I use flock for both temp and main files during update. My main file
gets blown away on occasions. What gives? I can't figure out why this
h
sertYourText $_",);
close FILE;
Thanks
- Original Message -
From: "bc" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, January 24, 2002 5:54 AM
Subject: csv flat file
hello
i have a flat file (csv) [it has about 114 rows]
i want to put the word "
Hello World!"
But in this case you needed the string at the beginning of the line.
-Original Message-
From: bc [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 24, 2002 10:56 AM
To: Timothy Johnson; 'Jon Molin '
Subject: Re: csv flat file
ah, i see your point, and is that
good point.
-Original Message-
From: Russ Foster
To: [EMAIL PROTECTED]
Sent: 1/24/02 8:37 AM
Subject: RE: csv flat file
Depending on the size of the file, you may not want to read the whole
thing
into memory first.
So...
open(OUTFILE,">outfile.csv") ;
open(INFILE,&
Depending on the size of the file, you may not want to read the whole thing
into memory first.
So...
open(OUTFILE,">outfile.csv") ;
open(INFILE,"mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 24, 2002 10:30 AM
To: 'Jon Molin '; 'bc '
Cc: [EMAIL PROTECT
;
foreach $line(@infile){
$line = "insert ".$line;
}
open(OUTFILE,">infile.csv");
print OUTFILE @infile;
-Original Message-
From: Jon Molin
To: bc
Cc: [EMAIL PROTECTED]
Sent: 1/24/02 5:44 AM
Subject: Re: csv flat file
bc wrote:
>
> hello
>
> i
bc wrote:
>
> hello
>
> i have a flat file (csv) [it has about 114 rows]
>
> i want to put the word "insert " in front of each row,
>
> how it the "for each" writtin? in other words, in perl, how do i do a for each row
>insert the word &quo
hello
i have a flat file (csv) [it has about 114 rows]
i want to put the word "insert " in front of each row,
how it the "for each" writtin? in other words, in perl, how do i do a for each row
insert the word "insert ", then it comes out of the "for each" loop thingy...?
On Thu, 17 Jan 2002 14:01:28 -0700, [EMAIL PROTECTED] (Aaron White) wrote:
>Does anyone have a simple script that can handle about ten fields from a basic html
>form, that can be written to a flat file.
Here's a simple one that will save all params to a pipe=delimited fat-text fi
Does anyone have a simple script that can handle about ten fields from a basic html
form, that can be written to a flat file.
--
/_/_/ Aaron K. White
_/ _/ _/ _/ _/ Americas Mission Control
_/_/_/ _/ _/ _/_/ _/ Web Administration & De
> -Original Message-
> From: Joe Echavarria [mailto:[EMAIL PROTECTED]]
> Sent: Sunday, October 28, 2001 7:02 PM
> To: [EMAIL PROTECTED]
> Subject: Flat File
>
>
> Hi there,
>
>I have a flat file with the follwoing structure :
>
> city|name|pho
--On Sonntag, 28. Oktober 2001 16:02 -0800 Joe Echavarria
<[EMAIL PROTECTED]> wrote:
> Hi there,
>
> I have a flat file with the follwoing structure :
>
> city|name|phone|zip.
>
>The script save each row with "\n" at the end.
>
> If fo
($city,$name,$phone,$zip) = (s/\|/, $variable_representing_each_entry )
print "City=$city\n";
- Original Message -
From: "Joe Echavarria" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Sunday, October 28, 2001 4:02 PM
Subject: Flat File
> H
Hi there,
I have a flat file with the follwoing structure :
city|name|phone|zip.
The script save each row with "\n" at the end.
If for example i wish to display all rows of the
cities in Miami. That is city=Miami.
How can i do it ?
I have been trying regular expresion
I'm in the middle of coding myself so I'll be brief, help you get some
direction.
First, I wouldn't set you're permissions to 777, BUT that all depends on
what
the user is that would be writing to the file. What I mean is, the web
server
is the one that is going to be writing to the file so, and
ive downloaded
a simple perl script that im trying to run
on my computer
-i use the updated version of indigo perl on win98
-listed below are the html and scripts
-can someone tell me where i am going wrong
-someone on the list told me that i dont have my
permissions set to chmod 777, however f
essage -
From: "Paul" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>; "bc" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Tuesday, July 24, 2001 1:49 PM
Subject: Re: flat file (addendum)
>
> --- Paul <[EMAIL PROTECTED]>
IL PROTECTED]>; "bc" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Tuesday, July 24, 2001 1:49 PM
Subject: Re: flat file (addendum)
>
> --- Paul <[EMAIL PROTECTED]> wrote:
> Maybe instead of just
>
> > use CGI;
>
> you should say
>
>
--- Paul <[EMAIL PROTECTED]> wrote:
Maybe instead of just
> use CGI;
you should say
use CGI;
use CGI::Carp 'fatalsToBrowser';
That'll help you debug. =o)
__
Do You Yahoo!?
Make international calls for as low as $.04/minute with Yahoo! Mes
thanks bossman! :)
will i like this better than asp?
- Original Message -
From: "Paul" <[EMAIL PROTECTED]>
To: "bc" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Tuesday, July 24, 2001 1:45 PM
Subject: Re: flat file
&
--- bc <[EMAIL PROTECTED]> wrote:
> i'm an old asp/vbscript dude, i do not know how to "...make sure the
> file is open" either? any real quick explanation you can give me to
> get the file open in perlScript/CGI? to match what you said below?
lol ok:
use strict; # option explicit, but bett
i'm an old asp/vbscript dude, i do not know how to "...make sure the file is
open" either? any real quick explanation you can give me to get the file
open in perlScript/CGI? to match what you said below?
> --- bc <[EMAIL PROTECTED]> wrote:
> > how, in perl/cgi, or, what is a popular way of conne
--- bc <[EMAIL PROTECTED]> wrote:
> how, in perl/cgi, or, what is a popular way of connecting to, and
> displaying, a csv file's contents to a browser, in table form?
Er.
Okay, um
CSV as in Comma Seperated Values?
...start the page, print the table headers, make sure the file is open,
then
how, in perl/cgi, or, what is a popular way of connecting to, and displaying, a csv
file's contents to a browser, in table form?
thanks,
bc
Hello all,
I would like to take a moment to thank everyone who helped me out on
my project. I am obviously new to Perl and am a total hack, but eventually,
I will become proficient. For those that are wondering, my lap dance
program is just a small contest for members of www.ten.com and
On Thu, Jun 28, 2001 at 05:34:22PM +0100, mark crowe (JIC) wrote:
> > $compare = { split (/:/, $stats)};
> > @records = \$compare;
>
> I think you'd be better off to use:
> @records = split (/:/, $stats)
While this is correct..
> At the moment you are splitting t
On Thu, Jun 28, 2001 at 09:06:38AM -0700, Jon Riddle wrote:
Be forewarned, what follows is a critique of code you didn't ask about.
> #!/usr/local/bin/perl -w
>
> use CGI;
> use CGI::Carp qw(carpout fatalsToBrowser);
Always:
use strict;
when debugging code.
> $Q = CGI;
This assigns the
p it working.
It's not the prettiest code I've ever seen though...
Cheers
Mark C
> Hello everyone,
> I am trying to create a simple cgi script that if a
> user enters the
> correct information on a contest form, they are entered into
> a flat-file DB.
>
Hello everyone,
I am trying to create a simple cgi script that if a user enters the
correct information on a contest form, they are entered into a flat-file DB.
This I have conquered. My next feat is that before I write their personal
information into the DB, I am comparing 3 fields from
On Thu, May 24, 2001 at 10:58:38PM -0400, Stephen P. Potter wrote:
> Lightning flashed, thunder crashed and chris brown <[EMAIL PROTECTED]> whispered:
> | I would prefer to write each record using pack, but I
> | can't see how to elegantly get pack to zero-fill
> | without using sprintf. And I ki
Lightning flashed, thunder crashed and chris brown <[EMAIL PROTECTED]> whispered:
| I would prefer to write each record using pack, but I
| can't see how to elegantly get pack to zero-fill
| without using sprintf. And I kind of feel like once
| I'm using sprintf I might as well ONLY use sprintf f
Hello,
Looking for style advice here.
I'm trying to populate records into a flat-file layout
for transfer to a mainframe (offtopic: the FAXed file
layout I received says "prior revision: 11/01/81".
Sweet!).
Anyway, the layout requires that numerics be
zero-filled to the le
68 matches
Mail list logo