change directory help in perl

2007-06-21 Thread Sayed, Irfan (Irfan)
Hi , I have written following script. Problem with the script is that it is not changing the directory as per the foreach loop and because of that cleartool command is failing. can somebody please help. Here is the script. #!/usr/bin/perl -w @arr = `cleartool lsvob -s`; foreach(@arr) { `cd

Error in executing the script

2007-08-06 Thread Sayed, Irfan (Irfan)
Hi All, I have following script #!/usr/atria/bin/Perl use strict; use warnings; # Subroutine prototypes join_proj(); rebase(); deliver(); quit(); # Define the actions to take my %action_to_take = ( '1' => \&join_proj, '2' => \&rebase, '3' =

RE: Error in executing the script

2007-08-09 Thread Sayed, Irfan (Irfan)
quot;; Select one of the project: @proj Your choice: EOT } else {quit();} Please help. Regards Irfan. -Original Message- From: Jeff Pang [mailto:[EMAIL PROTECTED] Sent: Monday, August 06, 2007 8:44 PM To: Sayed, Irfan (Irfan); beginners@perl.org Subject: R

Dynamically assign the no.

2007-08-09 Thread Sayed, Irfan (Irfan)
Hi All, I am running one system command in my perl script. The output of this command is different every time. sometimes it gives 3 line output sometimes 4 line output. Now my req. is that I need to catch this output and assign serial no.s to them. for example : command is " cleartool lsproj"

Array modification

2007-08-16 Thread Sayed, Irfan (Irfan)
Hi All, I have one array which stores some data after executing specific command. Depends on situation , command has different output at different time. sometime array may store 4 values or it may store 5 values. Now my req. is that I need to assign no. to those values. for example: if arra

RE: Array modification

2007-08-16 Thread Sayed, Irfan (Irfan)
on then my programme should pick up the third element of the array Please help Regards Irfan. -Original Message- From: Chas Owens [mailto:[EMAIL PROTECTED] Sent: Thursday, August 16, 2007 4:16 PM To: Sayed, Irfan (Irfan) Cc: beginners@perl.org Subject: Re: Array modification On 8/16

Regular expression

2007-10-19 Thread Sayed, Irfan (Irfan)
Hi All, I have one string aic_8.0@/vobs/pvob_aic which is stored in one variable $project Now I need only that part of that string which is before @ so I have written following regular expression to achieve this... my ($pvob) = ($project =~ m{(.+)@}); and with the help of this reg. exp. I am

FW: Regular expression

2007-10-21 Thread Sayed, Irfan (Irfan)
Can somebody please help me on following doubt. --Irfan. -Original Message- From: Sayed, Irfan (Irfan) Sent: Friday, October 19, 2007 4:49 PM To: 'Siva Prasad' Subject: RE: Regular expression But still my doubt exist. How Perl knows that it has to stop at the @

Perl module

2007-10-23 Thread Sayed, Irfan (Irfan)
Hi All, How to refer Perl module in Perl script which is not there in the @INC path. I don't have permission to add this module in the @INC path I need to use the SendMail.pm module , but that is not there in the default @INC path. Can I refer the path of this module in my actual Perl script?

RE: Perl module

2007-10-23 Thread Sayed, Irfan (Irfan)
-- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Jeff Pang Sent: Tuesday, October 23, 2007 1:38 PM To: Sayed, Irfan (Irfan) Cc: beginners@perl.org Subject: Re: Perl module On 10/23/07, Sayed, Irfan (Irfan) <[EMAIL PROTECTED]> wrote: > Hi All, > > How to refer Perl modu

RE: Perl module

2007-10-23 Thread Sayed, Irfan (Irfan)
Still the error is same. Please find the attached Perl script for reference. Please guide. Regards Irfan. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Jeff Pang Sent: Tuesday, October 23, 2007 2:18 PM To: Sayed, Irfan (Irfan) Cc: beginners

RE: Perl module

2007-10-23 Thread Sayed, Irfan (Irfan)
Thanks Jeff. It's working now. Regards Irfan. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Jeff Pang Sent: Tuesday, October 23, 2007 2:30 PM To: Sayed, Irfan (Irfan) Cc: beginners@perl.org Subject: Re: Perl module use lib qw(/home/cc

test

2007-10-24 Thread Sayed, Irfan (Irfan)

qx string

2007-10-24 Thread Sayed, Irfan (Irfan)
Hi All, I am executing following line in my perl script. chomp(@files = qx("cleartool desc -fmt "%[versions]p\n" activity:$ENV{"CLEARCASE_ACTIVITY"}")); But i am getting following error when i execute the script. sh: cleartool desc -fmt %[versions]p: not found sh: activity:: not found As

qx string

2007-10-24 Thread Sayed, Irfan (Irfan)
Hi All, I am executing following line in my perl script. chomp(@files = qx("cleartool desc -fmt "%[versions]p\n" activity:$ENV{"CLEARCASE_ACTIVITY"}")); But i am getting following error when i execute the script. sh: cleartool desc -fmt %[versions]p: not found sh: activity:: not found As

test

2007-10-24 Thread Sayed, Irfan (Irfan)
test

Array Manipulation

2007-10-25 Thread Sayed, Irfan (Irfan)
Hi All, I have one array say my @test=(1,2,3,4,5); if I print this array it will print like this print "@test\n"; and the output is 1 2 3 4 5 now my req. is that I want to store these array values in another array in such a fashion where I can print like 1 2 3 4 5 so I mean to say that if I t

RE: Array Manipulation

2007-10-25 Thread Sayed, Irfan (Irfan)
r reference. Please guide. Thanks in Advance. Regards Irfan. -Original Message- From: Gunnar Hjalmarsson [mailto:[EMAIL PROTECTED] Sent: Thursday, October 25, 2007 5:06 PM To: beginners@perl.org Subject: Re: Array Manipulation Sayed, Irfan (Irfan) wrote: > I have one array say my

error in qx

2007-10-26 Thread Sayed, Irfan (Irfan)
Hi All, I am executing my $usr=qx("who am i"); to get the user id on unix machine but it is giving error. sh: who am i: not found Please guide how to resolve this Thanks Irfan.

RE: error in qx

2007-10-26 Thread Sayed, Irfan (Irfan)
Thanks for replying to this mail. Now I need to write a regular expression so that I only get username from the output of this command. So I have written like this. my $usr=`who am i`; $usr=~ m{(.+)\s$}; print "$usr\n"; But still I am not getting only username. Please guide. Regards Irfan.

Split function

2007-10-30 Thread Sayed, Irfan (Irfan)
Hi All, I have one variable which stores the value as follows. "2007-09-07T12:50:26+05:30 aic_8.0_Integration ccvob01" Now my requirement is that I want to store aic_8.0_Integration part of the string in different variable. so what I did was I ran following code. chomp(my @strm = split(/

Regular expression to get part of string

2007-11-21 Thread Sayed, Irfan (Irfan)
Hi All, I have one variable which has the value as follows "ccvob01pts/2Nov 21 12:17 (135.27.157.38 logged in ." Now I want only "ccvob01" from that string so I wrote reg.exp. as follows my ($usr1)=($usr =~ m{(.+)\S$}); where $usr contains above string. But still I am not

RE: Regular expression to get part of string

2007-11-21 Thread Sayed, Irfan (Irfan)
Thanks Jeff -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Jeff Pang Sent: Wednesday, November 21, 2007 4:26 PM To: Sayed, Irfan (Irfan) Cc: beginners @ perl. org Subject: Re: Regular expression to get part of string On Nov 21, 2007 6:47 PM, Sayed

RE: Regular expression to get part of string

2007-11-21 Thread Sayed, Irfan (Irfan)
Thanks Rob -Original Message- From: Rob Dixon [mailto:[EMAIL PROTECTED] Sent: Wednesday, November 21, 2007 4:33 PM To: beginners @ perl. org Cc: Sayed, Irfan (Irfan) Subject: Re: Regular expression to get part of string Sayed, Irfan (Irfan) wrote: > > I have one variable whi

help in if - else loop in perl

2007-11-27 Thread Sayed, Irfan (Irfan)
Hi All, I am getting error while running following script.Error is due to improper if else loop and curly braces. Can you please guide me in placing the braces in right position and doing proper if..else looping My requirement is that I want to quit as soon as "if condition" fails.Please guide

array modification

2007-12-11 Thread Sayed, Irfan (Irfan)
Hi All, I have some string stored in array as follows. @array=(dadsad,assasd) Now if i print this array then it is printing as dadsad,assasd Now i want output like dadsad assasd so i did for (@array) { print $_,"\n"; } My query is that can i store the output of this for loop in vari

Help on regular expression

2007-12-13 Thread Sayed, Irfan (Irfan)
Hi All, I have a string like this CLEARCASE_CMDLINE = (mkact -nc notme sprint) Now with the regular expression what I want is only those characters before closing braces excluding white space character. I mean to say that if regular expression encounter the white space character then it should

RE: Help on regular expression

2007-12-13 Thread Sayed, Irfan (Irfan)
: beginners@perl.org >> Perl Beginners Cc: Sayed, Irfan (Irfan) Subject: Re: Help on regular expression Sayed, Irfan (Irfan) wrote: > Hi All, > > I have a string like this > > CLEARCASE_CMDLINE = (mkact -nc notme sprint) Now with the regular > expression what I want is only

reg. ex.

2007-12-20 Thread Sayed, Irfan (Irfan)
Hi All, I have one string like this "test@/vobs/pvob_aic"; Now I want only "test" from this string, so I wrote reg. ex. like this $test="test@/vobs/pvob_aic"; $ts = ($test =~ m{(.+)@$}); print "$ts\n"; But I am getting output as 1 not a string "test" can some body please give me exact reg

RE: reg. ex.

2007-12-20 Thread Sayed, Irfan (Irfan)
Pang [mailto:[EMAIL PROTECTED] Sent: Thursday, December 20, 2007 2:31 PM To: Sayed, Irfan (Irfan); beginners @ perl. org Subject: Re: reg. ex. -Original Message----- >From: "Sayed, Irfan (Irfan)" <[EMAIL PROTECTED]> >Sent: Dec 20, 2007 4:53 PM >To: "beginners @ per

Perl issue

2006-07-17 Thread Sayed, Irfan \(Irfan\)
Hi, I am executing following perl script # perl script to change the hostname of every replica / VOB use strict; my $CT = "ct"; my @vob_list = `$CT lsvob -s`; print "Following are the VOBs / Replicas whose hostname needs to be change \n"; print @vob_list; foreach my $a (@vob_list)

RE: Perl issue

2006-07-17 Thread Sayed, Irfan \(Irfan\)
\n means a newline character. I tried putiing '' around the $a but still same error. plz help Regards Irfan. -Original Message- From: Dr.Ruud [mailto:[EMAIL PROTECTED] Sent: Monday, July 17, 2006 5:30 PM To: beginners@perl.org Subject: Re: Perl issue "Sayed, Irfan (

Perl help

2006-07-17 Thread Sayed, Irfan \(Irfan\)
Hi , I am executing following code foreach (@vob_list) { my @repl = `$CT lsreplica -invob $_ | grep cmvobsvr1mum`; print @repl; } but i am not getting proper output for grep can anybody plz help me Regards Irfan.

RE: Perl help

2006-07-17 Thread Sayed, Irfan \(Irfan\)
tried. but still same error. regards irfan. -Original Message- From: Owen Cook [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 18, 2006 12:11 PM To: Sayed, Irfan (Irfan) Cc: beginners@perl.org Subject: Re: Perl help On Tue, 18 Jul 2006, Sayed, Irfan (Irfan) wrote: > >

RE: Perl help

2006-07-18 Thread Sayed, Irfan \(Irfan\)
k plz help Regards Irfan. -Original Message- From: Jeff Peng [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 18, 2006 12:31 PM To: Sayed, Irfan (Irfan); beginners@perl.org Subject: RE: Perl help > >foreach (@vob_list) > { > my @repl = `$CT lsreplica -invob $_ | grep cmvob

search option in perl

2006-07-18 Thread Sayed, Irfan \(Irfan\)
Hi all, I need to search a file for a specific string thru perl script. for example i want to put following condition in the script. --- > first search the string string1 > and if that string found then search for another string string2 > if both the string found then print both the

RE: search option in perl

2006-07-18 Thread Sayed, Irfan \(Irfan\)
- From: Rob Dixon [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 18, 2006 9:09 PM To: beginners@perl.org Subject: Re: search option in perl Sayed, Irfan (Irfan) wrote: > Hi all, > > I need to search a file for a specific string thru perl script. > > for example i want t

RE: search option in perl

2006-07-18 Thread Sayed, Irfan \(Irfan\)
-Original Message- From: Rob Dixon [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 18, 2006 9:47 PM To: beginners@perl.org Subject: Re: search option in perl Sayed, Irfan (Irfan) wrote: > >> -Original Message- >> From: Rob Dixon [mailto:[EMAIL PROTECTED] &

split function

2006-07-19 Thread Sayed, Irfan \(Irfan\)
Hi, I need to split following string cs_backup_restore_cmvobsvr1mum the output which i am looking for is cs_backup_restore and _cmvobsvr1mum can anybody plz help regards irfan.

RE: split function

2006-07-19 Thread Sayed, Irfan \(Irfan\)
-Original Message- From: Xavier Noria [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 19, 2006 1:33 PM To: Perl Beginners Subject: Re: split function On Jul 19, 2006, at 9:57, Sayed, Irfan ((Irfan)) wrote: > I need to split following string > > cs_backup_restore_cmvobsvr1mu

array help

2006-07-20 Thread Sayed, Irfan \(Irfan\)
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 tell me what is wrong? Regards Irfan.

Rel help in array

2006-07-20 Thread Sayed, Irfan \(Irfan\)
Hi, I have one array called as @array1 which has some data I have another @array2 which also has some data. now for each element / value of both these arrays i need to a run a specific command at a time , not one by one. means that for every element of both these arrays i have to run specifi

RE: Rel help in array

2006-07-20 Thread Sayed, Irfan \(Irfan\)
sorry I didn't get anything can u please give some codeline. regards irfan. -Original Message- From: Wagner, David --- Senior Programmer Analyst --- WGO [mailto:[EMAIL PROTECTED] Sent: Thursday, July 20, 2006 10:39 PM To: Sayed, Irfan (Irfan); Perl Beginners Subject: RE: Rel he

array help

2006-07-20 Thread Sayed, Irfan \(Irfan\)
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 tell me what is wrong? Regards Irfan.

Recall: array help

2006-07-20 Thread Sayed, Irfan \(Irfan\)
Sayed, Irfan (Irfan) would like to recall the message, "array help".

Putting file content into an array

2006-07-20 Thread Sayed, Irfan \(Irfan\)
Hi, I need to read a specific file and put the each line of that file into an array. I mean first line will go to the first position of the array , second line shud go to the second position of the array and so on. How do i do that ? Please let me know. Regards Irfan.

foreach loop

2006-07-21 Thread Sayed, Irfan \(Irfan\)
Hi, I am executing following code. foreach (@vob_repl_list) { print $_; `$MT chreplica -host puvob02 $_`; } but I am not getting the value of $_ in the command `$MT chreplica -host puvob02 $_`; if I print the value of $_ then it's printing fine. but in command it's not taking that value. so

RE: foreach loop

2006-07-24 Thread Sayed, Irfan \(Irfan\)
chreplica -host puvob02 $a`; I know that array @vob_repl_list is not empty. plz help regards irfan. -Original Message- From: Stephen Kratzer [mailto:[EMAIL PROTECTED] Sent: Friday, July 21, 2006 6:46 PM To: beginners@perl.org Subject: Re: foreach loop On Friday 21 July 2006 08:59, Sa

command execution

2006-07-24 Thread Sayed, Irfan \(Irfan\)
Hi All, I am executing following command ` $MT chreplica`; I need to find out wheather this command is executing properly or not. If it's executing properly then i need to print the message saying that " command executed successfully" Can anybody please help me. Regards Irfan.

sending output to file

2006-07-27 Thread Sayed, Irfan \(Irfan\)
Hi All, I need to send / print / write the output of one command to a file through perl script can anybody plz help. Regards Irfan.

sending output to file

2006-07-27 Thread Sayed, Irfan \(Irfan\)
Hi All, I need to send / print / write the output of one command to a file through perl script can anybody plz help. Regards Irfan.

File opeartions help

2006-07-27 Thread Sayed, Irfan \(Irfan\)
Hi, I am executing following code. i need to send the output of system($cmd); command to the file . how do i do that plz help Regards Irfan. #/usr/atria/bin/Perl -w use strict; use warnings; my $CT = "/usr/atria/bin/cleartool"; my @vob_list = `$CT lsvob -s`; my $fname = "/t

book to learn perl

2006-08-02 Thread Sayed, Irfan \(Irfan\)
Hi, Can anybody plz guide , which is the best book to learn perl. some good names plz Regards Irfan.

file help

2006-08-02 Thread Sayed, Irfan \(Irfan\)
Hi All, Following is the code which i am executing but i am not getting the output of command my $out = system($cmd); into the file. Plz help. Regards Irfan. #/usr/atria/bin/Perl -w use strict; use warnings; my $CT = "/usr/atria/bin/cleartool"; my @vob_list = `$CT lsvob -s`; m

file help

2006-08-03 Thread Sayed, Irfan \(Irfan\)
Hi All, I did as follows but still not getting output in a file. plz help #/usr/atria/bin/Perl -w use strict; use warnings; my $CT = "/usr/atria/bin/cleartool"; my @vob_list = `$CT lsvob -s`; my $fname = "/tmp/vob_trigger"; open FILE,">>",$fname or die $!; foreach (@vob_list) {

exit status

2006-08-14 Thread Sayed, Irfan \(Irfan\)
Hi All, I am executing a specific command thru perl script. if the output of the command is NULL (not error , not any output) then that NULL output / status i want to catch. Can anybody please help. Regards Irfan.

split function help

2006-08-29 Thread Sayed, Irfan \(Irfan\)
Hi All, I need to use the split function in perl script. * /vobs/apache_log4j /usr/add-on/puccase_vob01/ccvob01/apache_log4j.vbs public (replicated) Above line i need to split in following order * /vobs/apache_log4j /usr/add-on/puccase_vob01/ccvob01/apache_log4j.vbs public (replicated)

help with awk command in perl

2006-08-29 Thread Sayed, Irfan \(Irfan\)
Hi All, I have a following script in perl in which i am using awk command but it is not getting executed properly. # /usr/atria/bin/Perl -w use strict; use warnings; my $fname = "/tmp/checkvob_log"; open(FILE,">>$fname"); my $CT = "/usr/atria/bin/cleartool"; my @vob_list = `$CT lsvo

array help

2006-09-20 Thread Sayed, Irfan \(Irfan\)
Hi, if i use one array in foreach loop then can i use same array in another part of the code. I am getting following error while executing perl script. Global symbol "@repl1" requires explicit package name at ch_repl_name.pl line 24. can anybody please help me. Regards Irfan.

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

Proper output

2006-09-22 Thread Sayed, Irfan \(Irfan\)
Hi All, I am not getting the proper output in @vob_rep Array. Following 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: Proper output

2006-09-25 Thread Sayed, Irfan \(Irfan\)
Can any body please help on this Regards Irfan. _ From: Sayed, Irfan (Irfan) Sent: Friday, September 22, 2006 12:59 PM To: beginners@perl.org Subject: Proper output Hi All, I am not getting the proper output in @vob_rep Array. Following is my code # Perl script to change

RE: Proper output

2006-09-26 Thread Sayed, Irfan \(Irfan\)
: Proper output Sayed, Irfan (Irfan) wrote: > > I am not getting the proper output in @vob_rep Array. > > Following is my code > > # Perl script to change the replica name > > use strict; > > use warnings; > > my $fname = "/tmp/vob_list1";

remote login using perl

2006-10-17 Thread Sayed, Irfan \(Irfan\)
Hi all, I need to login to the windows machine remotely using perl script . I searched the perl modules and CPAN network. but did not get any. Is there any way to do this in perl script.? Can anybody has done this before. please help Regards Irfan.

RE: remote login using perl

2006-10-18 Thread Sayed, Irfan \(Irfan\)
:[EMAIL PROTECTED] Sent: Thursday, October 19, 2006 12:48 AM To: Sayed, Irfan (Irfan) Cc: beginners@perl.org Subject: Re: remote login using perl Irfan, When you say remote login, what do you mean by that? is that via ssh or via remote desktop or any the way? If the remote machine can support

delete function

2006-11-28 Thread Sayed, Irfan \(Irfan\)
Hi, I have two arrays . one array contains the element which needs to be deleted from the secound array in which that element is already present. I have tried using delete function but somehow i did not succeed. Could somebody please help me on this Regards Irfan.

RE: delete function

2006-11-29 Thread Sayed, Irfan \(Irfan\)
: Mug [mailto:[EMAIL PROTECTED] Sent: Wednesday, November 29, 2006 3:29 PM To: Sayed, Irfan (Irfan) Subject: Re: delete function Hi Irfan, You may reply to the list next time, so more people could help. Sayed, Irfan (Irfan) wrote: Hi Mug, I did not get the

RE: delete function

2006-11-29 Thread Sayed, Irfan \(Irfan\)
Attachment got blocked Sending again _ From: Sayed, Irfan (Irfan) Sent: Wednesday, November 29, 2006 4:35 PM To: 'Mug' Cc: 'beginners@perl.org' Subject: RE: delete function Hi Mug, Thanks for your mail. I have attached my script for your reference. I have

test

2007-01-09 Thread Sayed, Irfan \(Irfan\)
test

removing character from string (regular expresion)

2007-01-15 Thread Sayed, Irfan \(Irfan\)
Hi All, I have one variable $feature which contains value as "feature level: 2". Now i need to remove "feature level: " and need only 2 as a output. I mean from the value "feature level: 2" i need only 2. Basically i need to trucate/remove "feature level: ". I tried in the following way $fe

execution of script in one shell

2007-01-30 Thread Sayed, Irfan \(Irfan\)
Hi All, I am executing one perl script which has one clearcase command "cleartool setview". after running this command it starts a new shell and my script stop executing further. Is there any way so that i can run script including this cleartool setview command in one shell itself. Please hel

command execution

2007-02-02 Thread Sayed, Irfan \(Irfan\)
Hi All, I am executing following script. but even if the command execution fails it prints as success exit status = 0 can anybody please help Regards Irfan. use strict; use warnings; my $CT = '/usr/atria/bin/cleartool'; print " Creating the view for VB \n"; my $cmd = "$CT mkview -tag vb_te

regular expression

2007-02-06 Thread Sayed, Irfan \(Irfan\)
Hi All, Following is my code # /usr/bin/perl use strict; use warnings; my $CT = "/usr/atria/bin/cleartool"; my @vob_list = `$CT lsvob -s`; my $ele; my @vob_list1; my $i; my $size; $size = $#vob_list+1; for ($i=0;$i<=$size;$i++) { $ele = $vob_list[$i]; $ele =~ s/$ele/"$ele",/g; $vob_l

Array manipulation

2007-02-09 Thread Sayed, Irfan \(Irfan\)
Hi All, I have one array say @test = (1,2,3,2,5). Now if you observe 2 is repeating in this array on second position and fourth position. My requirement is that if such value is repeating twice then i just want to remove one value and keep other value. So my array should look like @test = (1,

error in execution

2007-02-09 Thread Sayed, Irfan \(Irfan\)
Hi All, I am getting following error while executing perl script ~/irf>perl lsco.pl Can't locate List/MoreUtils.pm in @INC (@INC contains: /usr/perl5/5.8.4/lib/sun4-solaris-64int /usr/perl5/5.8.4/lib /usr/perl5/site_perl/5.8.4/sun4-solaris-64int /usr/perl5/site_perl/5.8.4 /usr/perl5/site_perl /

concatenation

2007-02-12 Thread Sayed, Irfan \(Irfan\)
Hi All, I need to concatenate specific string for each element in the array. I tried in the following way with the help of join operator. foreach (@mail) { my $str1=$_; $str1=$str1 . "@abc.com"; print "$str1\n"; } But somehow it is not getting concateneted. please help. Regards Irfan

FW: Array manipulation

2007-02-13 Thread Sayed, Irfan \(Irfan\)
Hi All, I have one array having values as follows User [EMAIL PROTECTED] User [EMAIL PROTECTED] User [EMAIL PROTECTED] Now I formatted above array as per your suggession as follows in order to remove duplicate value "User" @test = grep { ++$hash{$_} < 2 } @test; but output is as follows which

sendmail

2007-02-20 Thread Sayed, Irfan \(Irfan\)
Hi All, I need to send mail to all users defined in one array. I tried foreach loop but what is happening is it is sending mail to only first user in the array. not sending mails to rest of the users. Is there any way to send a mail to all users in array in one shot. I am using sendmail 2.09 mo

array operation

2007-02-26 Thread Sayed, Irfan \(Irfan\)
Hi all, # /usr/bin/perl use strict; use warnings; my $CT = "/usr/atria/bin/cleartool"; my @test = (1,2,3,4,5); print "@test\n"; The output of the above script is 1 2 3 4 5 But i need output as 1 2 3 4 5 In short i need to append \n character after every element of the array. Pleas

extract data from array

2007-02-26 Thread Sayed, Irfan \(Irfan\)
Hi All, I have following data in the 0 th position of the array.i need to extract only 143 Days Old:143--User:yevala--Element:/vobs/ivr/air.pj/hdrs/irDefines.h I did in the following way. my @data=("Days Old:143--User:yevala--Element:/vobs/ivr/air.pj/hdrs/irDefines.h" ); foreach(@data) { my @da

windows command in perl

2007-03-19 Thread Sayed, Irfan \(Irfan\)
Hi all, I am executing following command on windows platform in perl programme. my $cmd1 = `set USERNAME`; but I am facing following error. Z:\>ccperl rec_bl.pl 'USERNAME' is not recognized as an internal or external command, operable program or batch file. Does anybody help in how to exec

need help in module

2007-04-25 Thread Sayed, Irfan \(Irfan\)
HI All, I need to use CQPerlExt module in my Perl script. I searched CPAN but did not find anything. Can anybody plz help me in getting this.. Regards Irfan.