Regex question.

2008-07-04 Thread Gunwant Singh
Hi all, Thanks for all the help provided so far in my earlier queries. I have a query regarding regexes. I am to match only one specific word in a wordlist which has only those alphabets which it contains and none other than that. For example: My Wordlist contains: alpha alpha1 beta betaze

Re: find and multiline delete

2008-07-04 Thread John W. Krahn
Brian Funk wrote: I need a starting point to learn to accomplish the following action: I need to take a plain text ascii file such as: Foo a line of variable text another line of variable text morelines and morelines Foo a line of variable text another line of variable text morelines and moreli

Re: find and multiline delete

2008-07-04 Thread Smoot Carl-Mitchell
On Fri, 2008-07-04 at 21:32 -0500, Brian Funk wrote: > I need a starting point to learn to accomplish the following action: > > In short, I want to see "Foo" in the file and delete the next two lines > following. This pattern can repeat hundreds of times within the file and > spread across mult

Re: How to remove [], {}, and other characters, rendering numeric values in a CSV file ?

2008-07-04 Thread perez . erasmo
A la cluster[1] = { 2 3 4 8 10 14 } cluster[2] = { 2 3 4 8 10 14 } ... cluster[1234567] = { 2 3 4 8 10 14 } ... cluster[45689080] = { 2 3 4 8 10 14 } thank you very much On 04/07/2008, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Hi dear Yitzle and Perl list: > > I have discovered that the nu

find and multiline delete

2008-07-04 Thread Brian Funk
I need a starting point to learn to accomplish the following action: I need to take a plain text ascii file such as: Foo a line of variable text another line of variable text morelines and morelines Foo a line of variable text another line of variable text morelines and morelines Foo a line of v

Re: How to remove [], {}, and other characters, rendering numeric values in a CSV file ?

2008-07-04 Thread perez . erasmo
Hi dear Yitzle and Perl list: I have discovered that the number between square brackets [] won't be only a one-digit number, but now it can contain an un-foreseen number of digits, because the number inside the square brackets will grow from 1 to several millions As I have just stated, with a one

Re: Integer data type

2008-07-04 Thread John W. Krahn
Roy M wrote: Hi Hello, On Jul 4, 11:19 am, [EMAIL PROTECTED] (John W. Krahn) wrote: perldoc perlnumber btw, are there any typeof command so I can check the data type of a scalar? You can use ref(): You can think of "ref" as a "typeof" operator. perldoc -f ref Also Scalar::Util ha

Re: Integer data type

2008-07-04 Thread Rob Dixon
Roy M wrote: > Hi > > On Jul 4, 11:19 am, [EMAIL PROTECTED] (John W. Krahn) wrote: >> perldoc perlnumber >> > > Thanks, > > btw, are there any typeof command so I can check the data type of a > scalar? A Perl scalar value (including array and hash elements) can have more than one type simultane

Re: Integer data type

2008-07-04 Thread Yitzchok Good
On Fri, Jul 4, 2008 at 3:29 AM, Roy M <[EMAIL PROTECTED]> wrote: > Hi > > On Jul 4, 11:19 am, [EMAIL PROTECTED] (John W. Krahn) wrote: >> perldoc perlnumber >> > > Thanks, > > btw, are there any typeof command so I can check the data type of a > scalar? > > Thanks Scalar /is/ the variable type. An

Re: Integer data type

2008-07-04 Thread Roy M
Hi On Jul 4, 11:19 am, [EMAIL PROTECTED] (John W. Krahn) wrote: > perldoc perlnumber > Thanks, btw, are there any typeof command so I can check the data type of a scalar? Thanks -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.o

Re: Removing lines from start of tag to end of tag in XML's

2008-07-04 Thread Rob Dixon
life is beautiful wrote: > Hi All, > Can some one help me gain knowledge as how I can > delete few lines from XML. > > Example > > java:/LockTestDb > javax.sql.DataSource > Application > Shareable > > > wm/default > com.ibm.web

Re: Debug Help Please

2008-07-04 Thread Andy
On Jul 4, 1:16 am, [EMAIL PROTECTED] (John W. Krahn) wrote: > Andy wrote: > > Well Disregard the above script I made changes that I think were > > needed, but I still have no output in the .csv files > > You still have some of the same mistakes that were in the program the > last time you posted it

Removing lines from start of tag to end of tag in XML's

2008-07-04 Thread life is beautiful
Hi All, Can some one help me gain knowledge as how I can delete few lines from XML. Example java:/LockTestDb javax.sql.DataSource Application Shareable wm/default com.ibm.websphere.asynchbeans.WorkManager Container

Re: Optimize the script

2008-07-04 Thread jet speed
On 7/4/08, John W. Krahn <[EMAIL PROTECTED]> wrote: > > jet speed wrote: > >> Hi All, >> > > Hello, > > I put togather a piece of code with some help, to capture the output as >> below from a file "cxout1" as below. I am sure this can be written in few >> lines or even differnt way of getting the s

Re: Optimize the script

2008-07-04 Thread John W. Krahn
jet speed wrote: Hi All, Hello, I put togather a piece of code with some help, to capture the output as below from a file "cxout1" as below. I am sure this can be written in few lines or even differnt way of getting the same out put with use of hash etc. Kindly help me to optimize the code. A

Re: Optimize the script

2008-07-04 Thread jet speed
Hi Rob, Great, Thanks for sorting this out, Much appericiated. Cheers Js On 7/4/08, Rob Dixon <[EMAIL PROTECTED]> wrote: > > jet speed wrote: > > > > Great, Thanks it works. Perfect. > > > > I Will explore your recommendation for using seek File option. I will > read > > some doc. > > > > In yo

Re: Optimize the script

2008-07-04 Thread Rob Dixon
jet speed wrote: > > Great, Thanks it works. Perfect. > > I Will explore your recommendation for using seek File option. I will read > some doc. > > In your code, Pls explain what this piece of code does. > > $sl{$1}++ if /\bID=(CK\w+)/i; jet speed wrote: > > I think it finds the bit starting

Re: Optimize the script

2008-07-04 Thread jet speed
Hi Rob, I think it finds the bit starting with CK, if matches it stores in $sl($1) and finally prints the key value as. keys %sl, bec's all matches are same it strores only once. am i correct ? Pls correct me if am wrong. Many Thanks Js On 7/4/08, jet speed <[EMAIL PROTECTED]> wrote: > > Hi

Re: Optimize the script

2008-07-04 Thread jet speed
Hi Rob, Great, Thanks it works. Perfect. I Will explore your recommendation for using seek File option. I will read some doc. In your code, Pls explain what this piece of code does. $sl{$1}++ if /\bID=(CK\w+)/i; Many Thanks Js On 7/4/08, Rob Dixon <[EMAIL PROTECTED]> wrote: > > jet speed

Re: Optimize the script

2008-07-04 Thread Rob Dixon
jet speed wrote: > Hi All, > > I put togather a piece of code with some help, to capture the output as > below from a file "cxout1" as below. I am sure this can be written in few > lines or even differnt way of getting the same out put with use of hash etc. > Kindly help me to optimize the code. A

Optimize the script

2008-07-04 Thread jet speed
Hi All, I put togather a piece of code with some help, to capture the output as below from a file "cxout1" as below. I am sure this can be written in few lines or even differnt way of getting the same out put with use of hash etc. Kindly help me to optimize the code. Any help would be much apperic

Re: substitution

2008-07-04 Thread Dr.Ruud
epanda schreef: Don't top post. Don't quote signatures and other trailers. > rvtol: >> epanda: >>> I want to replace my pattern by the corresponding value of the key >>> in the hash table [...] >>> with a single %s/pattern/hashpattern/g expression >> >> Why that last condition? Sounds like homew

Re: mysql data store in to a FILE

2008-07-04 Thread Dr.Ruud
luke devon schreef: > I just tried to store some mysql-queried data in to a file. but it > wont work. Actually i wanted to do not just writing , it should be > APPEND at each time when that perl scripts runs. > > Can some body help me , if you all can provide me a sample or a > example would be