Sayed, Irfan (Irfan) wrote:
> 
>  I have modified the code in this fashion
>  
> # /usr/bin/perl
> use strict;
> use warnings;
>  
> my $CT = "/usr/atria/bin/cleartool";
> my @vob_list2 = map qq{"$_ ",}, `$CT lsvob -s`;
> chomp (@vob_list2);
> print "@vob_list2";
> 
> but output is as follows
>  
> ", "/vobs/cs_usersync
>  ", "/vobs/apache_common_daemon
>  ", "/vobs/apache_common_daemon_rel
>  ", "/vobs/viewtools
>  ",
>  
> I need output as follows
>  
> "/vobs/cs_usersync",
> "/vobs/apache_common_daemon",
> "/vobs/apache_common_daemon_rel",
> "/vobs/viewtools",


You need to chomp the line inside the map block like this:

my @vob_list2 = map { chomp; qq("$_ ",) } `$CT lsvob -s`;




John
-- 
Perl isn't a toolbox, but a small machine shop where you can special-order
certain sorts of tools at low cost and in short order.       -- Larry Wall

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to