Incrementing the letters in an array

2002-04-18 Thread Allison Ogle
Maybe it is because I am assigning my array to a line from another document and not assigning letters dirtectly to the array because it still doesn't work. It could be there is something wrong with my code too. $word=; #where is the filehandle and therefore $word gets the string from the inpu

Incrementing the letters in an array

2002-04-18 Thread Allison Ogle
Hi, I have an array which contains letters. I need to increment these letters in the array one at a time. For example going from B to C. I was trying something like $array[$x]++; however that increments the letter to the number 1. Does anyone have any ideas? Thanks in advance. Allison -

Assigning the characters of a variable to an array

2002-04-17 Thread Allison Ogle
Hello, This is a simple question, I'm sure. Due to lack of resources however I have to ask... I want to store each of the letters and numbers in a variable into an array. For example, $var=A2B3C4D and I want the elements of my array to be A 2 B 3 C 4 D. Can anyone help? Thanks, Allison --

Deleting the contents of a file

2002-04-11 Thread Allison Ogle
Hi, I want to opena datafile and erase it's all it's contents. Can anyone help? Thanks, Allison -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Renaming a File

2002-04-10 Thread Allison Ogle
Hi, I am trying to open a file which has no file extension. (For example ABC ). What I want to do is rename the file with a file extension. (For example ABC.dat). Does anyone know how to do this? Thanks, Allison -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail:

RE: Filehandle = blank line???

2002-04-04 Thread Allison Ogle
Thanks,it finally worked. -Original Message- From: Timothy Johnson [mailto:[EMAIL PROTECTED]] Sent: Thursday, April 04, 2002 4:52 PM To: 'Allison Ogle'; Timothy Johnson; Nikola Janceski; a a Subject: RE: Filehandle = blank line??? That's where the \s* instead of \s

RE: Filehandle = blank line???

2002-04-04 Thread Allison Ogle
My code so far... $word = ; chomp $word; if ($word=~ /^\s+$/){ print "There is no word."; } -Original Message- From: Timothy Johnson [mailto:[EMAIL PROTECTED]] Sent: Thursday, April 04, 2002 4:30 PM To: 'Allison Ogle'; Timothy Johnson; Nikola Jance

RE: Filehandle = blank line???

2002-04-04 Thread Allison Ogle
I did mean $word=. It was just written wrong in the e-mail. Sorry about that. -Original Message- From: Timothy Johnson [mailto:[EMAIL PROTECTED]] Sent: Thursday, April 04, 2002 4:25 PM To: 'Allison Ogle'; Nikola Janceski; a a Subject: RE: Filehandle = blank line??? Ok,

RE: Filehandle = blank line???

2002-04-04 Thread Allison Ogle
I will actually be storing the filehandle as a variable and then comparing it. Something like = $word; chomp $word; if ($word eq 'blank line') { ... } how would I use your suggestion in this case? if ($word=~ /^\s*$/) doesn't seem to work. -Original Message- From: Nikola Jancesk

FW: Hash Values (again)

2002-04-04 Thread Allison Ogle
$word=; # chomp $word; # } # while ( ($key, $value) = each %seen) { # print "$key => $value\n"; # } # } #} -Original Message- From: David Kirol [mailto:[EMAIL PROTECTED]] Sent: Thursday, April 04, 2002 1

Hash Values (again)

2002-04-04 Thread Allison Ogle
Hi, I have a hash with all the values set to zero. I want to use the filehandle and if the filehandle matches a key in the hash I want to increment the value from zero. Does anyone know how to do this? I'm lost with hashes :( Thanks, Allison -- To unsubscribe, e-mail: [EMAIL PROTECTED] For

Hash Values (again)

2002-04-04 Thread Allison Ogle
Hi, I have a hash with all the values set to zero. I want to use the filehandle and if the filehandle matches a key in the hash I want to increment the value from zero. Does anyone know how to do this? I'm lost with hashes :( Thanks, Allison -- To unsubscribe, e-mail: [EMAIL PROTECTED] For

Opening a datafile

2002-04-03 Thread Allison Ogle
Hi, I am trying to figure out how to open a datafile without knowing the name of the datafile. For example, using the below code, I can open the datafile LogFile.dat from the folder where the script is located. Both the script and LogFile.dat are saved in the same folder therefore the below cod

RE: Array question

2002-04-01 Thread Allison Ogle
Thanks for your help. I finally got it to work. Allison -Original Message- From: drieux [mailto:[EMAIL PROTECTED]] Sent: Monday, April 01, 2002 3:44 PM To: [EMAIL PROTECTED] Subject: Re: Array question On Monday, April 1, 2002, at 11:11 , Aman Raheja wrote: > $array-prob.pl p1: I l

Array question

2002-04-01 Thread Allison Ogle
Hi, I have a datafile with a list of names like Ana John Mike Tracy John Luke etc. I don't know how long the list is and eventually in the list some of the names will repeat. I want to put these names in an array but I don't want to repeat any names in the array and I want to keep a count

Search for a word in between words

2002-03-27 Thread Allison Ogle
To give you even more information, in my datafile, the word that I am searching for is 'marked' by the word in the line before it. For example, the lines in my datafile look like.. line 1 line 2 line 2 Installation example Installation line 4 line 5 line 6 and all I want is the word in betwee

RE: search

2002-03-27 Thread Allison Ogle
I am reading a datafile and searching for a specific word. Any help is greatly appreciated. Thanks, Allison -Original Message- From: John Edwards [mailto:[EMAIL PROTECTED]] Sent: Wednesday, March 27, 2002 11:15 AM To: 'Allison Ogle'; a a Subject: RE: search http://w

search

2002-03-27 Thread Allison Ogle
Does anyone know how to search for a word? -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Search for a word

2002-03-25 Thread Allison Ogle
Hi, I am writing a parser using Perl. I am trying to determine the best way to do a search for a word in a datafile. Currently I am using the filehandle to do this however I will need a different method as my search invloves knowing the text in other lines. Does anyone have any suggestions? T

write to an Excel document

2002-03-12 Thread Allison Ogle
Hi Does anyone know how to write to an Excel document? I've opened the document using OLE but I cannot find any documentation on how to store data in the spreadsheet. If anyone knows what the commands are to do this please let me know. Thanks, Allison -- To unsubscribe, e-mail: [EMAIL PROT

Assigning part of a string to a variable using the filehandle.

2002-03-11 Thread Allison Ogle
Hi, I have a problem trying to assign part of a string to a variable using the filehandle. For example, if the string was DisplayName =XYZ and I want to assign XYZ to the variable $mytext in the code below how would I do this. I am having trouble with the line ($mytext) =()=~ /DisplayName(.*)/

Installing Perl

2002-03-05 Thread Allison Ogle
Hi, I was wondering how to install Perl. I am on a Win32 operating system. Thanks. Ally -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]