Re: Creating array variable names on the fly

2009-08-28 Thread ANJAN PURKAYASTHA
Thanks for your feedback guys. I think I have enough material to start coding. Cheers! Anjan On Fri, Aug 28, 2009 at 9:32 AM, Steve Bertrand wrote: > Jenda Krynicky wrote: > > From: ANJAN PURKAYASTHA > >> Hi, > >> I have a question on creating array variables. I

Re: Creating array variable names on the fly

2009-08-28 Thread Steve Bertrand
Jenda Krynicky wrote: > From: ANJAN PURKAYASTHA >> Hi, >> I have a question on creating array variables. I have a driver script that >> takes as input the number of files to be processed (say 7). One of the >> children scripts needs to create array variables based on

Re: Creating array variable names on the fly

2009-08-28 Thread Shawn H. Corey
ANJAN PURKAYASTHA wrote: Hi, I have a question on creating array variables. I have a driver script that takes as input the number of files to be processed (say 7). One of the children scripts needs to create array variables based on how many files are being processed (in this case 7). How do

Re: Creating array variable names on the fly

2009-08-28 Thread Jenda Krynicky
From: ANJAN PURKAYASTHA > Hi, > I have a question on creating array variables. I have a driver script that > takes as input the number of files to be processed (say 7). One of the > children scripts needs to create array variables based on how many files are > being processed

Re: Creating array variable names on the fly

2009-08-28 Thread Steve Bertrand
ANJAN PURKAYASTHA wrote: > Hi, > I have a question on creating array variables. I have a driver script that > takes as input the number of files to be processed (say 7). One of the > children scripts needs to create array variables based on how many files are > being processed

Creating array variable names on the fly

2009-08-28 Thread ANJAN PURKAYASTHA
Hi, I have a question on creating array variables. I have a driver script that takes as input the number of files to be processed (say 7). One of the children scripts needs to create array variables based on how many files are being processed (in this case 7). How do I code the following action

Re: creating @array

2001-06-05 Thread Paul
--- Eduard Grinvald <[EMAIL PROTECTED]> wrote: > oops, overlooked the obvious: you are opening the file for appending > only, not for reading... :) Ed beat me to it. =o) > > open(FILE, ">>$filename"); doesn't need the ">>". Just say open(FILE, $filename); Though I'd add error checki

Re: creating @array

2001-06-05 Thread Paul
--- Eduard Grinvald <[EMAIL PROTECTED]> wrote: > Hey, > 1) you don't need anything in an array to push something into it > 2) The best way to get a file into an array is simply @array = FILEHANDLE Just to be explicit, let's use an example. Assuming FILEHANDLE is in fact the name of your fil

Re: creating @array

2001-06-04 Thread Hasanuddin Tamir
On Mon, 4 Jun 2001, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote, > Date: Mon, 4 Jun 2001 19:36:13 -0500 (CDT) > From: [EMAIL PROTECTED] > To: Perl Discuss <[EMAIL PROTECTED]> > Subject: creating @array > > open(FILE, ">>$filename"); >

Re: creating @array

2001-06-04 Thread Eduard Grinvald
oops, overlooked the obvious: you are opening the file for appending only, not for reading... :) - Original Message - From: <[EMAIL PROTECTED]> To: "Eduard Grinvald" <[EMAIL PROTECTED]> Cc: "Perl Discuss" <[EMAIL PROTECTED]> Sent: Monday, June

Re: creating @array

2001-06-04 Thread charles
> 2) The best way to get a file into an array is simply @array = > FILEHANDLE when i do this: open(FILE, ">>$filename"); print FILE "$add\@$domain\t$destination_email\n"; @entries = ; close(FILE); @entries = sort(@entries); $n = @entries; $o = 0; open(

Re: creating @array

2001-06-04 Thread Eduard Grinvald
nday, June 4, 2001 8:36 pm Subject: creating @array >open(FILE, ">>$filename"); > print FILE "$add\@$domain\t$destination_email\n"; > while () { >chomp $_; >push(@entries, $_); > } >close(FILE); > >

creating @array

2001-06-04 Thread charles
open(FILE, ">>$filename"); print FILE "$add\@$domain\t$destination_email\n"; while () { chomp $_; push(@entries, $_); } close(FILE); i have a file that i would like to put each of its lines into an array as seperate elements. the @entries array does not e