Hi, This is the code I am using which I got from Dyana.
my @test1 = map($_."\n", @test); print @test1, "\n"; but the issue is that in my array , the values are something like this. M:\isayed_aic_8.0_int\vob1\34er@@\main\IC_8.0_Integration\7 M:\isayed_aic_8.0_int\vob1\test\New Text Document(2).txt@@\main\IC_8.0_Integration\4 I want to make these values as follows and store in a separate array M:\isayed_aic_8.0_int\vob1\34er@@\main\IC_8.0_Integration\7 M:\isayed_aic_8.0_int\vob1\test\New Text Document(2).txt@@\main\IC_8.0_Integration\4 Actual script is attached for 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 @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 type print "@test1\n"; then output should > come as > 1 > 2 > 3 > 4 > 5 { local $" = "\n"; print "@test\n"; } -- Gunnar Hjalmarsson Email: http://www.gunnar.cc/cgi-bin/contact.pl -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/
{\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\fswiss\fcharset0 Arial;}} {\*\generator Msftedit 5.41.15.1507;}\viewkind4\uc1\pard\f0\fs20 # perl script to send am e-mail when delivery complets\par use strict;\par use warnings;\par use lib qw(/home/ccvob01/irf/lib);\par use SendMail 2.09;\par #my $os=$^O;\par my @files;\par print "$ENV\{CLEARCASE_ACTIVITY\}\\n";\par chomp($ENV\{CLEARCASE_ACTIVITY\});\par chomp(@files = qx("cleartool desc -fmt %[versions]p activity:$ENV\{"CLEARCASE_ACTIVITY"\}"));\par chomp(@files);\par #my $temp = 'cleartool desc -fmt "%[versions]p' . "\\n\\"" . 'activity:' . $ENV\{"CLEARCASE_ACTIVITY"\};\par #chomp(@files = qx($temp));\par my @files1=map($_ . "\\n", @files);\par print "$files1[0]\\n";\par sendmail();\par \par sub sendmail\par \{\par my $sm = new SendMail("301081ANEX1.global.avaya.com");\par # We set the debug mode "ON".\par #\par $sm->setDebug($sm->ON);\par my $CT = "/usr/atria/bin/cleartool";\par \par $sm->From("CC VOB Admin -Pune <[EMAIL PROTECTED]>");\par \par # We set the subject.\par #\par $sm->Subject("Delivery has been completed successfully");\par \par \par # We set the recipient.\par \par #$sm->To("$usr");\par $sm->To("[EMAIL PROTECTED]");\par #$sm->To("Smita <[EMAIL PROTECTED]>");\par \par \par # We set the content of the mail.\par #\par $sm->setMailBody ("This is an auto generated mail.PLease reply to [EMAIL PROTECTED],\\n\\n Following is the entire description for the delivery.\\n\\n UCM Project: $ENV\{CLEARCASE_PROJECT\}\\n UCM source stream: $ENV\{CLEARCASE_SRC_STREAM\}\\nUCM destination stream:$ENV\{CLEARCASE_STREAM\}\\nUCM integration activity: $ENV\{CLEARCASE_ACTIVITY\}\\nUCM activities delivered: $ENV\{CLEARCASE_DLVR_ACTS\} \\n\\n UCM view: $ENV\{CLEARCASE_VIEW_TAG\}\\n\\n Following files got delivered in this operation \\n\\n @files1 \\n\\n Thank You \\n Pune RDPS SCM Team");\par #\par # Attach a testing image.\par #\par #$sm->Attach("/tmp/lsco_log");\par #$sm->Attach("/tmp/lsco_log1");\par #\par # Check if the mail sent successfully or not.\par #\par if ($sm->sendMail() != 0) \{\par print $sm->\{'error'\}."\\n";\par exit -1;\par \}\par \par #\par # Mail sent successfully.\par #\par print "Done\\n\\n";\par #exit 0;\par \}\par }
-- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/