RE: [OT] Education Level

2003-12-07 Thread Charles K. Clarkson
Mr M senthil kumar <[EMAIL PROTECTED]> wrote: : : I have come across your mails a couple of times in this : list. The signature part always make me wonder what your : profession means? Sorry if i am offending you in anyway, : i was just curious. Is it something funny like "Assistant : Button Pushe

dbmopen problem

2003-12-07 Thread Joel Newkirk
I've run into a problem. I have been working on a webmin module that, among other things, maintains a dbm file of regular expressions. One subroutine is passed a string, and if any of the regular expressions matches, it returns the associated explanation text. I can read and write this dbm with n

RE: sorter script [was: Frustrated newbie question]

2003-12-07 Thread Tom Kinzer
*Consciously* making the decision that your script will no longer be portable... my $2Cents; -Tom Kinzer -Original Message- From: Bryan Harris [mailto:[EMAIL PROTECTED] Sent: Sunday, December 07, 2003 5:32 PM To: Beginners Perl Subject: Re: sorter script [was: Frustrated newbie question]

RE: stripping last field of a carriage return

2003-12-07 Thread Tom Kinzer
Oops. 012. :( -Original Message- From: Tom Kinzer [mailto:[EMAIL PROTECTED] Sent: Sunday, December 07, 2003 9:41 PM To: R. Joseph Newton; Bryan Harris Cc: Beginners Perl Subject: RE: stripping last field of a carriage return 013 is line feed, aka "new line". -Tom Kinzer -Original

RE: stripping last field of a carriage return

2003-12-07 Thread Tom Kinzer
Owen, I've had trouble doing this exact thing before with Perl regular expressions on AIX, I never got in and figured out what exactly was the root cause, but I just switched to the 'tr' command and it worked fine. Something to try. -Tom Kinzer -Original Message- From: Owen [mailto:[EMAI

RE: stripping last field of a carriage return

2003-12-07 Thread Tom Kinzer
013 is line feed, aka "new line". -Tom Kinzer -Original Message- From: R. Joseph Newton [mailto:[EMAIL PROTECTED] Sent: Sunday, December 07, 2003 7:24 PM To: Bryan Harris Cc: Beginners Perl Subject: Re: stripping last field of a carriage return Bryan Harris wrote: > > I have tried to s

RE: Reading from a log - still a problem

2003-12-07 Thread Tom Kinzer
Also, Daniel Post what the data you're scanning looks like. That should help. -Tom -Original Message- From: danield [mailto:[EMAIL PROTECTED] Sent: Sunday, December 07, 2003 8:43 PM To: [EMAIL PROTECTED] Subject: Reading from a log - still a problem Hello all, I have received a solut

RE: Reading from a log - still a problem

2003-12-07 Thread Tom Kinzer
Debug time. Need more info. Is it ever meeting the if's condition's? Try this and see what happens: #!/usr/bin/perl -w use strict; my $log_file = "/appl/log/4e4d/20031130.txt"; open LOG, "< $log_file" or die "Could not open file $!"; my ($valueCount, $lineCount); while ( ) { chomp; $li

Reading from a log - still a problem

2003-12-07 Thread danield
Hello all, I have received a solution for my problem (reading from log) from Tom Kinzer. The code is: #!/usr/bin/perl -w use strict; my $log_file = "/appl/log/4e4d/20031130.txt"; open LOG, "< $log_file" or die "Could not open file $!"; while ( ) { chomp; if ( /^GTotal Content:/ ) { my

Re: [OT] Education Level

2003-12-07 Thread R. Joseph Newton
"Charles K. Clarkson" wrote: > Hello, > > A recent job posting has left me curious. I would never > take a full time job as a programmer or as anything else for > that matter. I just don't make a good employee any more. > Been there. Done that. > > The job posting demanded a college degree

Re: stripping last field of a carriage return

2003-12-07 Thread R. Joseph Newton
Bryan Harris wrote: > > I have tried to strip the carriage return of the last field > > > > $field[8] =~ s/\015//g; > > Uh, isn't the carriage return code 13? > > - B Not in octal. Joseph -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: How to process multi-line records ?

2003-12-07 Thread Randy W. Sims
On 12/7/2003 9:34 PM, [EMAIL PROTECTED] wrote: Hi all: This newbie is back looking for some hints on how to handle this problem in processing a file that has multiline records that look something like this: Name: Joe Blow DataField1: x DateField1: 07/07/77 DataField2: x DateField2: 1

Re: stripping last field of a carriage return

2003-12-07 Thread Paul Johnson
On Sun, Dec 07, 2003 at 06:39:50PM -0800, drieux wrote: > > On Dec 7, 2003, at 5:40 PM, Bryan Harris wrote: > [..] > >>I have tried to strip the carriage return of the last field > >> > >>$field[8] =~ s/\015//g; > > > >Uh, isn't the carriage return code 13? > > our $CRLF = "\015\012"; # "\r\n"

Re: Perl version on Solaris

2003-12-07 Thread rs
On solaris if you do perl -v, you should see perl 5.005 That is what ships from Solaris. The path is /usr/bin It is reccommended that you do not overwrite the perl that comes with solaris as it is used by solaris for scripts etc. If you install a later perl, make the path /usr/local/bin or somethi

RE: How to process multi-line records ?

2003-12-07 Thread Tom Kinzer
array or two should do the trick. depends on what you want to check in your conditionals. are the number of lines per data "element" static or dynamic? to separate the logic between, collecting the data and the records conditionals, just separate into 2 loops. LOGIC code only: while ( )

RE: [OT] Education Level

2003-12-07 Thread Tom Kinzer
High school. Been performing (well) in jobs "requiring" a masters degree for the last 4 or 5 years. Never had anyone balk at the lack of papers, perhaps due to the fact that i have a stable professional experience record with large corporations. Like others, I've worked with people from GEDs to

Re: stripping last field of a carriage return

2003-12-07 Thread drieux
On Dec 7, 2003, at 5:40 PM, Bryan Harris wrote: [..] I have tried to strip the carriage return of the last field $field[8] =~ s/\015//g; Uh, isn't the carriage return code 13? our $CRLF = "\015\012"; # "\r\n" is not portable [jeeves: 42:] perl -e 'print ord("\n")' 10[jeeves: 43:] perl -e 'prin

How to process multi-line records ?

2003-12-07 Thread stuart_clemons
Hi all: This newbie is back looking for some hints on how to handle this problem in processing a file that has multiline records that look something like this: Name: Joe Blow DataField1: x DateField1: 07/07/77 DataField2: x DateField2: 12/07/03 Name: Fi Doe DataField1: x DateFi

Re: stripping last field of a carriage return

2003-12-07 Thread Owen
On Sun, 07 Dec 2003 12:20:46 -0700 "Michael J. Golini" <[EMAIL PROTECTED]> wrote: > I have tried to strip the carriage return of the last field > > $field[8] =~ s/\015//g; You have to know how your original data was created. In Windows, each line is terminated by "\r\n" (carriage return follow

Re: stripping last field of a carriage return

2003-12-07 Thread Bryan Harris
> I have tried to strip the carriage return of the last field > > $field[8] =~ s/\015//g; Uh, isn't the carriage return code 13? - B -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: sorter script [was: Frustrated newbie question]

2003-12-07 Thread stuart_clemons
Hi drieux: The link that failed for you, worked for me. That link led to this link which had the code. http://products.daviddurose.com/cgi-bin/download.cgi?script=sort - Message from drieux <[EMAIL PROTECTED]> on Sun, 7 Dec 2003 09:04:51 -0800 - To: Perl Perl <[EMAIL PROTECTED]> Subj

Re: [OT] Education Level

2003-12-07 Thread radhika sambamurti
On Sun, 7 Dec 2003 11:34:11 -0600 "Charles K. Clarkson" <[EMAIL PROTECTED]> wrote: > Hello, > > A recent job posting has left me curious. I would never > take a full time job as a programmer or as anything else for > that matter. I just don't make a good employee any more. > Been there. Done

Re: sorter script [was: Frustrated newbie question]

2003-12-07 Thread Bryan Harris
>> My next Perl task after I get my list of one name per line, is to sort the >> list and eliminate duplicate names. > > I have used the following script to sort and remove duplicate entries in flat > text files. > > http://www.downloaddatabase.com/databasesoftware/db-sorter-script.htm Someti

Re: [OT] Education Level

2003-12-07 Thread drieux
On Dec 7, 2003, at 10:56 AM, Rob Dixon wrote: [..] As a controversial afterthought, it seems to me that UK degrees are being downgraded to bring them in line with the more vocational US degrees. At present I think I'd sooner have earned a German BSc than the one I actually have. [..] I'm rather af

Re: [OT] Education Level

2003-12-07 Thread Robert
Rob Dixon wrote: Charles wrote: A recent job posting has left me curious. I would never take a full time job as a programmer or as anything else for that matter. I just don't make a good employee any more. Been there. Done that. The job posting demanded a college degree. I had one semester

Re: Perl & Mysql

2003-12-07 Thread Robert
Wiggins D'Anconia wrote: Vim is better than emacs, PHP is better than Perl, Red Hat is better than Suse, Gentoo is better than Debian, Gnome is better than KDE, Linux is better than Windows, Java is better than C++, MySQL is better than PgSQL I have heard these discussions before, no one ever seems

Re: Perl & Mysql

2003-12-07 Thread Robert
Randal L. Schwartz wrote: "Wiggins" == Wiggins D'Anconia <[EMAIL PROTECTED]> writes: Wiggins> But what are the reasons for choosing PostgreSQL over MySQL? What's a Wiggins> "real" database? Without providing reasons this is just FUD. I will Wiggins> agree that if you are looking for a package

RE: stripping last field of a carriage return

2003-12-07 Thread Amit Phatak
I have tried to strip the carriage return of the last field $field[8] =~ s/\015//g; try - chomp($field[8]); - Amit =-=-=-=-= "Every passing minute is another chance to turn it all around" - Dialogue from "Vanilla Sky" AMIT PHATAK | 001-716-553-1355 | http://www.acsu.buffalo.edu/~asphatak _

stripping last field of a carriage return

2003-12-07 Thread Michael J. Golini
I have a csv file that gets loaded into a database, but because someone entered a carriage return in the last text field it screws up the import. I have tried to strip the carriage return of the last field $field[8] =~ s/\015//g; but that does not do the job. It occurred to me that every line

Re: [OT] Education Level

2003-12-07 Thread Rob Dixon
Charles wrote: > > A recent job posting has left me curious. I would never > take a full time job as a programmer or as anything else for > that matter. I just don't make a good employee any more. > Been there. Done that. > > The job posting demanded a college degree. I had one > semester o

Re: Seeding a Random Number Generator

2003-12-07 Thread John W. Krahn
Owen wrote: > > On Sun, 07 Dec 2003 03:29:02 -0800 > "John W. Krahn" <[EMAIL PROTECTED]> wrote: > > > I did a "grep -i -r 'seed' *.c" and the only hit I got was in pp.c. > > FWIW > > [EMAIL PROTECTED] perl-5.8.2]# grep -r seed > > util.c:Perl_seed(pTHX) > util.c:* is enough real entropy to

Re: [OT] Education Level

2003-12-07 Thread Wiggins d'Anconia
Charles K. Clarkson wrote: Hello, A recent job posting has left me curious. I would never take a full time job as a programmer or as anything else for that matter. I just don't make a good employee any more. Been there. Done that. The job posting demanded a college degree. I had one semest

Re: [OT] Education Level

2003-12-07 Thread James Edward Gray II
On Dec 7, 2003, at 11:34 AM, Charles K. Clarkson wrote: Hello, A recent job posting has left me curious. I would never take a full time job as a programmer or as anything else for that matter. I just don't make a good employee any more. Been there. Done that. The job posting demanded a co

[OT] Education Level

2003-12-07 Thread Charles K. Clarkson
Hello, A recent job posting has left me curious. I would never take a full time job as a programmer or as anything else for that matter. I just don't make a good employee any more. Been there. Done that. The job posting demanded a college degree. I had one semester of college 20 years ago

Re: sorter script [was: Frustrated newbie question]

2003-12-07 Thread drieux
On Dec 7, 2003, at 3:31 AM, John W. Krahn wrote: [..] http://www.downloaddatabase.com/databasesoftware/db-sorter-script.htm Why? more importantly, How? I have tried a couple of times to download it and get nothing. the retreat to the handy dandy GET -d -u -U -s -S -e http://www.downloaddatabase

Re: Perl & Mysql

2003-12-07 Thread Wiggins d'Anconia
Randal L. Schwartz wrote: "Wiggins" == Wiggins D'Anconia <[EMAIL PROTECTED]> writes: Wiggins> But what are the reasons for choosing PostgreSQL over MySQL? What's a Wiggins> "real" database? Without providing reasons this is just FUD. I will Wiggins> agree that if you are looking for a package

Re: How to verify whether a directory exists

2003-12-07 Thread Rob Dixon
Wiggins D'Anconia wrote: > > B. Fongo wrote: > > I want to use mkdir(blah blah, o777), but want to first find out > > whether the directory "blah blah" exists. > > I'm not if the -e option will bw right here. Let's say: > > > >unless (-e blah_blah) mkdir(blah_blah, 0777); > > # Is this oka

Re: How to verify whether a directory exists

2003-12-07 Thread B. Fongo
Sometimes I don't answers to my questions; so I thought it might help - posting to both list. Next time, I'll remember to post to one list only. Thanks a lot. Wiggins d'Anconia wrote: Please don't cross post, if your question is CGI based then use that list, otherwise use the other... B. Fongo

Re: Seeding a Random Number Generator

2003-12-07 Thread Owen
On Sun, 07 Dec 2003 03:29:02 -0800 "John W. Krahn" <[EMAIL PROTECTED]> wrote: > I did a "grep -i -r 'seed' *.c" and the only hit I got was in pp.c. FWIW [EMAIL PROTECTED] perl-5.8.2]# grep -r seed util.c:Perl_seed(pTHX) util.c:* is enough real entropy to fill the seed. */ util.c:Perl_get_

Re: sorter script [was: Frustrated newbie question]

2003-12-07 Thread John W. Krahn
Saskia Van Der Elst wrote: > > On Friday 05 December 2003 10:53, [EMAIL PROTECTED] wrote: > > My next Perl task after I get my list of one name per line, is to sort the > > list and eliminate duplicate names. > > I have used the following script to sort and remove duplicate entries in flat > text

Re: Seeding a Random Number Generator

2003-12-07 Thread John W. Krahn
Tassilo Von Parseval wrote: > > On Sat, Dec 06, 2003 at 04:38:02PM -0800 John W. Krahn wrote: > > > > Download the source code for Perl if you don't already have it and have > > a look at the pp.c file. > > The actual seed is calculated in Perl_seed() in util.c. The calculation > of the seed itse

Re: Seeding a Random Number Generator

2003-12-07 Thread Tassilo von Parseval
On Sat, Dec 06, 2003 at 04:38:02PM -0800 John W. Krahn wrote: > Pd Schloss wrote: > > I'm reviewing a perl script that someone wrote to do a statistical > > analysis. I know it's bad form, but I was wondering if anyone knows > > what the default seed is for the random number generator in Perl.