Re: conditional looping

2003-04-12 Thread Rob Dixon
Debbie Cooper wrote: > Please help, I am completely new to Perl but need to write a script that > does the following: > > I have two directories DIR1 and DIR2 each containing files named LV1- > LV960.txt. > > I need to concatenate the files in DIR1 with the files in DIR2 and put > them in DIR3. So

Re: Array sorting.

2003-04-12 Thread Wiggins d'Anconia
Chris wrote: Hi Guys, I have something im basically stumped on, so mabey somebody can give me a hand ;) This is my scenario: I have a bunch of random URL's in a plain text file. I also have a text file with just the domain of certain URL's that are in the random URL file. IE: random file:

Re: conditional looping

2003-04-12 Thread Wiggins d'Anconia
Debbie Cooper wrote: Please help, I am completely new to Perl but need to write a script that does the following: I have two directories DIR1 and DIR2 each containing files named LV1- LV960.txt. I need to concatenate the files in DIR1 with the files in DIR2 and put them in DIR3. So DIR3 will now h

Array sorting.

2003-04-12 Thread Chris
Hi Guys, I have something im basically stumped on, so mabey somebody can give me a hand ;) This is my scenario: I have a bunch of random URL's in a plain text file. I also have a text file with just the domain of certain URL's that are in the random URL file. IE: random file: something.

conditional looping

2003-04-12 Thread Debbie Cooper
Please help, I am completely new to Perl but need to write a script that does the following: I have two directories DIR1 and DIR2 each containing files named LV1- LV960.txt. I need to concatenate the files in DIR1 with the files in DIR2 and put them in DIR3. So DIR3 will now have files named LV1

Re: regex doubt

2003-04-12 Thread Rob Dixon
[EMAIL PROTECTED] wrote: > Hi all, > > i have a set if keywords which i have to search for in the lines > beginning with character 'A' in the "file". > snippet follows - > > #!/usr/bin/perl -w > $keywords = "hello|world|all|chipset"; > open FH,"file"; > while() > { > print if(/^A/ && /(?:$keyword)

Re: inserting text at BEGINNING of file

2003-04-12 Thread Rob Dixon
Randal L. Schwartz wrote: > > > > > > "Mark" == Mark Van <[EMAIL PROTECTED]> writes: > > Mark> I am writing some blog software, but I can't figure out how to write > Mark> to the beginning of a file, because when I print to the file it always > Mark> goes at the end. Also, I don't want to overwrite

regex doubt

2003-04-12 Thread km
Hi all, i have a set if keywords which i have to search for in the lines beginning with character 'A' in the "file". snippet follows - #!/usr/bin/perl -w $keywords = "hello|world|all|chipset"; open FH,"file"; while() { print if(/^A/ && /(?:$keyword)/g); } close FH; is that correct or any other

Re: inserting text at BEGINNING of file

2003-04-12 Thread R. Joseph Newton
"mark van..." wrote: > I am writing some blog software, but I can't figure out how to write to > the beginning of a file, because when I print to the file it always > goes at the end. Also, I don't want to overwrite the existing text in > the file, I want to insert the new text. What is the code

Re: inserting text at BEGINNING of file

2003-04-12 Thread Wiggins d'Anconia
mark van... wrote: I am writing some blog software, but I can't figure out how to write to the beginning of a file, because when I print to the file it always goes at the end. Also, I don't want to overwrite the existing text in the file, I want to insert the new text. Well you can do it the v

Re: inserting text at BEGINNING of file

2003-04-12 Thread Randal L. Schwartz
> "Mark" == Mark Van <[EMAIL PROTECTED]> writes: Mark> I am writing some blog software, but I can't figure out how to write Mark> to the beginning of a file, because when I print to the file it always Mark> goes at the end. Also, I don't want to overwrite the existing text in Mark> the file, I

inserting text at BEGINNING of file

2003-04-12 Thread mark van...
I am writing some blog software, but I can't figure out how to write to the beginning of a file, because when I print to the file it always goes at the end. Also, I don't want to overwrite the existing text in the file, I want to insert the new text. -- To unsubscribe, e-mail: [EMAIL PROTECTED]