Re: [PBML] SED and AWK

2006-02-10 Thread Dermot Paikkos
On 10 Feb 2006 at 0:35, Peter Pan wrote: > OK. How would I do this in perl. I guess I could write a script to > call my perl script that runs this command > > --- In [EMAIL PROTECTED], [EMAIL PROTECTED] wrote: > > > > > "Peter" == Peter Pan <[EMAIL PROTECTED]> writes: > > > > Peter> I have m

RE: [PBML] SED and AWK

2006-02-10 Thread Wolcott, Kenneth A
> I think this might do it, presuming you have access to cat or > similar. > cat logfile.log | perl -e 'while (<>) { print if /Error/ }' > `perldoc perlrequick` would have given you the answer just as > quickly. Why do you use 'cat'? First of all it won't work for people who aren't on UNI

Re: [PBML] SED and AWK

2006-02-10 Thread Chas Owens
On 2/10/06, Dermot Paikkos <[EMAIL PROTECTED]> wrote: snip > > > Peter> "Error: building module..." If this pattern is hit I need > > to copy > > > Peter> that line and up 25 lines into a new file error.log. snip > cat logfile.log | perl -e 'while (<>) { print if /Error/ }' > > `perldoc perlrequic

Re: connect to oracle server

2006-02-10 Thread jm
thanks for the inputs. what i've been able to glean so far indicates i need the full oracle client and development softwares, so i guess i need to dig deeper in-house to see where i can get these. On 2/9/06, Bob Showalter <[EMAIL PROTECTED]> wrote: > jm wrote: > > On 2/9/06, Bob Showalter <[EMAIL

Re: [PBML] SED and AWK

2006-02-10 Thread Bjørge Solli
On Friday 10 February 2006 15:18, Chas Owens wrote: > perl -ne 'push @save, $_; shift if @save > 25; if (/Error: building > module/) {print; @save =()}' logfile.log Just curious. Do you actually print the 25 lines here? -- Bjørge Solli - Office:+47 55205847 cellph.:+47 91614343 Nansen Environmen

Re: whereis the socket mailing list

2006-02-10 Thread Jay Savage
On 2/9/06, Jeff Pang <[EMAIL PROTECTED]> wrote: > Thanks for Bob and Jay.I just want to know,when 'close' is called,what should > happen under the tcp protocol stack. > The question I really want to know is,when the server see the EOF coming from > the client,while the server-code doesn't call th

Re: Reading a Unicode text file

2006-02-10 Thread Jay Savage
On 2/9/06, JupiterHost.Net <[EMAIL PROTECTED]> wrote: > > > Baskaran Sankaran wrote: > > > Thanks for that but still I do face problem. I did that and it raises a > > warning: > > > > > > > > utf8 "\xFF" does not map to Unicode at second.pl line 8, > > <$lang_sample_fh> line 1. > > Excellent, so no

Trouble with line endings

2006-02-10 Thread Rick Triplett
I've encountered a perplexing file-reading difficulty. I pasted some dictionary definitions from a web page into Word and saved them as a text file. All the odd numbered lines had terms and their following even numbered lines had definitions. My goal was to convert every other line ending

Re: Trouble with line endings

2006-02-10 Thread Chas Owens
On 2/10/06, Rick Triplett <[EMAIL PROTECTED]> wrote: snip > My perplexities are these: Why did TextWrangler show \r for the line > endings after I had save them for Unix (\n)? And, why did Perl have > difficulty with the line endings in the first place? Perl is supposed > to be sensitive to the ope

Search and replace values in a fixed-width file

2006-02-10 Thread Ken Hill
I have the following perl script that reads a fixed-width file and replaces values in various sections of the file. --- open (IN, '< in.txt'); open (OUT, '> out_test.txt'); while () { chomp; $first_section = substr $_, 0, 381; # ex

Deleting rows in fixed-width file based on condition

2006-02-10 Thread Ken Hill
I have the following perl script that reads a fixed-width file and replaces values in various sections of the file. --- open (IN, '< in.txt'); open (OUT, '> out_test.txt'); while () { chomp; $first_section = substr $_, 0, 381; # ex

RE: A very basic question

2006-02-10 Thread Brian Volk
> -Original Message- > From: Avinash Sridhar [mailto:[EMAIL PROTECTED] > Sent: Thursday, February 09, 2006 1:41 PM > To: beginners@perl.org > Subject: A very basic question > > Hello All, > >I just joined this forum today and I dont know whether this particular > question has been p

Re: Deleting rows in fixed-width file based on condition

2006-02-10 Thread Chas Owens
On 2/10/06, Ken Hill <[EMAIL PROTECTED]> wrote: > I have the following perl script that reads a fixed-width file and > replaces values in various sections of the file. > > --- > open (IN, '< in.txt'); > open (OUT, '> out_test.txt'); > > while () { > >

Re: Search and replace values in a fixed-width file

2006-02-10 Thread Chas Owens
On 2/10/06, Ken Hill <[EMAIL PROTECTED]> wrote: > I have the following perl script that reads a fixed-width file and > replaces values in various sections of the file. > > --- > open (IN, '< in.txt'); > open (OUT, '> out_test.txt'); > > while () { > >

Re: Search and replace values in a fixed-width file

2006-02-10 Thread Chas Owens
On 2/10/06, Chas Owens <[EMAIL PROTECTED]> wrote: > On 2/10/06, Ken Hill <[EMAIL PROTECTED]> wrote: > > I have the following perl script that reads a fixed-width file and > > replaces values in various sections of the file. > > > > --- > > open (IN, '< in.txt

Re: Trouble with line endings

2006-02-10 Thread Xavier Noria
On Feb 10, 2006, at 18:17, Rick Triplett wrote: I've encountered a perplexing file-reading difficulty. I pasted some dictionary definitions from a web page into Word and saved them as a text file. All the odd numbered lines had terms and their following even numbered lines had definitions.

Re: Search and replace values in a fixed-width file

2006-02-10 Thread John W. Krahn
Ken Hill wrote: > I have the following perl script that reads a fixed-width file and > replaces values in various sections of the file. > > --- > open (IN, '< in.txt'); > open (OUT, '> out_test.txt'); You should verify that the files were opened successfull

Re: A very basic question

2006-02-10 Thread Avinash Sridhar
Hi Thanks for the reply. I managed to write and execute my perl program. Now my next question is , I am following the learning perl Llama book. There in Chapter 1, there is a function used whose output is perldoc -u -f atan2 =over 8 =item atan2 Y,X Returns the arctangent of Y/X in the range -

Re: A very basic question

2006-02-10 Thread Chas Owens
On 2/10/06, Avinash Sridhar <[EMAIL PROTECTED]> wrote: > Hi Thanks for the reply. I managed to write and execute my perl program. > > Now my next question is , I am following the learning perl Llama book. > > There in Chapter 1, there is a function used whose output is > > perldoc -u -f atan2 > > =

Re: A very basic question

2006-02-10 Thread Avinash Sridhar
Hello again, Thanks for the tip, indeed it is the backquote vs the single quote issue, looked deeper into the program and observed, they did mention to be careful on this. thanks On 2/10/06, Chas Owens <[EMAIL PROTECTED]> wrote: > > On 2/10/06, Avinash Sridhar <[EMAIL PROTECTED]> wrote: > >

searching question

2006-02-10 Thread Wijnand Wiersma
Sorry about the badly chosen subject. I want to search in a database for values belonging to a key. The key can be one word, or several words. I get the key in a string, but it is not needed that the whole string is the key. You may ask: "what is the perl language?" The key may be "the perl langua

pseudohash

2006-02-10 Thread Beast
Could someone explain what is pseudohash means? SOL. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]