Re: array help

2006-04-13 Thread Tom Phoenix
On 4/13/06, Irfan J Sayed <[EMAIL PROTECTED]> wrote: > I am executing following command. > > my @activity = system "cleartool lsactivity -short -view > Admin_Irfan_Project_int"; You seem to want backticks, also known as qx// . You can find it in the perlop manpage, in the section on "Quote and Qu

RE: array help

2006-04-13 Thread Ankur Gupta
Irfan J Sayed scribbled on Thursday, April 13, 2006 9:46 AM: > Hi, > > I am executing following command. > > my @activity = system "cleartool lsactivity -short -view > Admin_Irfan_Project_int"; > > but the output of this command is not storing in the array. array is

RE: array help

2006-07-20 Thread Wagner, David --- Senior Programmer Analyst --- WGO
Sayed, Irfan (Irfan) wrote: > Hi, > > I have written following line. but i am getting error > > my @test = ("/test" , "/playground"); > print @test; > > i am getting output as follows > > /test/playground > > i need the output in following fasion > > /test > /playground > > can you please t

Re: array help

2006-07-20 Thread Hal Wigoda
you have to add a "\n" between the 2 elements in the array. On Jul 20, 2006, at 9:51 AM, Sayed, Irfan ((Irfan)) wrote: Hi, I have written following line. but i am getting error my @test = ("/test" , "/playground"); print @test; i am getting output as follows /test/playground i need the o

Re: array help

2006-07-20 Thread Hal Wigoda
#!/usr/bin/perl my @test = ("/test" , "/playground"); print @test; print "\n"; print @test[0],"\n"; print @test[1],"\n"; you must print each array item with a \n On Jul 20, 2006, at 9:33 AM, Sayed, Irfan ((Irfan)) wrote: Hi, I have written following line. but i am getting error my @test =

Re: array help

2006-07-20 Thread Maxim
Hi, Use foreach smth like foreach $i (@test) { print "$i\n"; } On Thu, Jul 20, 2006 at 10:51:58PM +0800, Sayed, Irfan (Irfan) wrote: > Hi, > > I have written following line. but i am getting error > > my @test = ("/test" , "/playground"); > print @test; > > i am getting

Re: array help

2006-07-20 Thread Chad Perrin
On Thu, Jul 20, 2006 at 10:51:58PM +0800, Sayed, Irfan (Irfan) wrote: > Hi, > > I have written following line. but i am getting error > > my @test = ("/test" , "/playground"); > print @test; > > i am getting output as follows > > /test/playground > > i need the output in following fasion

Re: array help

2006-07-20 Thread Dr.Ruud
"Sayed, Irfan (Irfan)" schreef: > I have written following line. but i am getting error Which error? > my @test = ("/test" , "/playground"); > print @test; > > i am getting output as follows > > /test/playground > > i need the output in following fasion > > /test > /playground > > can you plea

RE: array help

2006-07-20 Thread Timothy Johnson
-Original Message- From: Dr.Ruud [mailto:[EMAIL PROTECTED] Sent: Thursday, July 20, 2006 4:18 PM To: beginners@perl.org Subject: Re: array help >> my @test = ("/test" , "/playground"); >> print @test; >> >> >> >> i need t

Re: array help

2006-09-20 Thread Igor Lopes
Global symbol "@repl1" requires explicit package name at ch_repl_name.pl line 24. It seems you are using strict, but not declaring @repl1 anywhere. If you post your code will be easier to help. -- Igor Lopes <[EMAIL PROTECTED]>

RE: array help

2006-09-20 Thread Sayed, Irfan \(Irfan\)
lice(my @repl1, -50); print @vob_rep; #close FILE1; I already declared the @repl1 in foreach loop. Please help Regards Irfan _ From: Igor Lopes [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 20, 2006 11:02 PM To: Sayed, Irfan (Irfan) Cc: beginners@perl.org Subject: R

RE: array help

2006-09-21 Thread Lee Goddard
> if i use one array in foreach loop then can i use same array > in another part of the code. What do you think? Have you actually tried to do this? Perhaps you could submit the smallest possible piece of code illustrate your prediciment? -- http://www.bbc.co.uk/ This e-mail (and any attachm

Re: array help

2006-09-21 Thread John W. Krahn
Sayed, Irfan (Irfan) wrote: > Here is my code > > # Perl script to change the replica name > > use strict; > use warnings; > > > # my $fname = "/tmp/vob_list1"; > # open FILE,">",$fname or die $!; > # my $fname1 = "/tmp/repl_list1"; > # open FILE1,">",$fname1 or die $!; > > my $CT = '/

Re: Array help needed please

2004-05-26 Thread Jose Alves de Castro
On Wed, 2004-05-26 at 12:05, William Kolln wrote: > This is a previous message from April left unanswered. > > > Can Anyone Help...thanks if you can! > > > > I have an array called group_vals. > > This array can be populated by any combination of values > e.g. /sp|lp|ep12|ffp|vid|dvd|bx|

Re: Array help almost correct

2004-05-26 Thread Jose Alves de Castro
On Wed, 2004-05-26 at 15:07, willy.k wrote: > Jose > > Many thanks for replying so quickly. > I will explain again, sorry but is complicated. > > > > ### > I have an array called group_vals. > > This array can be populated by any combination of values > e.g. /sp|lp|e

Re: Array help almost correct

2004-05-26 Thread Chris Charley
[snip] > my $acceptable = qr/^(?:sp|lp|ep12|ffp|vid|dvd|bx|bkk|cd|csd)$/; > > and then using $acceptable to do the matchings, such as > > grep /$acceptable/, @array > > > it would be faster and more readable :-) If the acceptable list is that large, using a hash would be TMTOWTDI :-) #!/usr

Re: Array help needed please

2004-05-26 Thread John W. Krahn
William Kolln wrote: > > This is a previous message from April left unanswered. > > Can Anyone Help...thanks if you can! > > I have an array called group_vals. > > This array can be populated by any combination of values > e.g. /sp|lp|ep12|ffp|vid|dvd|bx|bkk|cd|csd/ > > I want to be able