in reply to Re: Trying to capture a value from a list of values
in thread Trying to capture a value from a list of values
'$myhash{SBLLNXSRVRHOSTS})' has server names like -- dvapoms1,dvapoms2
The code shows below things --
The code shows below things --
Hope this clears the point. I need to catch dvapoms1 in $lnxsrvr.@mylnxsrvrs = split(',', $myhash{SBLLNXSRVRHOSTS}); @mywinsrvrs = split(',', $myhash{SBLWINSRVRHOSTS}); @mysblroot = split(',', $myhash{SIEBELROOT}); @mysblsrvrpath = (',',$myhash{SBLSRVRPATH}); foreach $something (@mylnxsrvrs) {my $lnxsrvr = "$something"; printf "$something $lnxsrvr\n\n";} ##dvapoms1 dvapoms1 ##dvapoms2 dvapoms2 printf "$lnxsrvr\n"; ##"shows null" printf "@mylnxsrvrs"; ##dvapoms1 dvapoms2
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^3: Trying to capture a value from a list of values
by tangent (Parson) on Sep 02, 2015 at 11:45 UTC | |
by parthodas (Acolyte) on Sep 02, 2015 at 12:05 UTC |
In Section
Seekers of Perl Wisdom