Hi,

if we have @routers.
you can do this
my ($c, $line);
$c=0;
foreach $line(@routers){
       $line = $line." P *NULL*";
        push @newrouters, $line;
}

or
to use the $c
foreach $line (@routers){
      @routers[$c] = $line." P *NULL*";
        $c++;
}

"Jonathan Musto" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Hi there,
>
> I've got an array of lines, split up by spaces as follows:
>
> Sun-router rack1.2 leeds
> Cisco-router rack3.2 skem
> Sun-switch rack2.3 manchester
> etc.....
>
> How can i add the following to the end of each line, P *NULL*?... e.g.
>
> Sun-router rack1.2 leeds P *NULL*
> Cisco-router rack3.2 skem P *NULL*
> Sun-switch rack2.3 manchester P *NULL*
>
> Any help would be much appreciated, thanks in advance!
>
> Regards,
>
>
> Jonathan Musto
>
>
>
> BT Global Services
> Telephone - 0113 237 3277
> Fax - 0113 244 1413
> E-mail -  <mailto:[EMAIL PROTECTED]> [EMAIL PROTECTED]
> http://www.technet.bt.com/sit/public
<http://www.technet.bt.com/sit/public>
>
>
> British Telecommunications plc
> Registered office: 81 Newgate Street London EC1A 7AJ
> Registered in England no. 1800000
> This electronic message contains information from British
Telecommunications
> plc which may be privileged or  confidential. The information is intended
to
> be for the use of the individual(s) or entity named above. If you  are not
> the intended recipient be aware that any disclosure, copying, distribution
> or use of the contents of  this information is prohibited. If you have
> received this electronic message in error, please notify us by  telephone
or
> email (to the numbers or address above) immediately.
>
>
>
>
>
>



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to