Jorge Goncalvez wrote:
> 
> Hi, I need some help to have a regexp which could replace : by - in this code:
> 
> my $cmd="arp -s $ipadress $_Globals{MAC_ADDRESS}";
> 
> system($cmd);
>  actually
> $_Globals{MAC_ADDRESS} is formatted like this :XX:XX:XX:XX:XX:XX and i wanted to
> put it like this: XX-XX-XX-XX-XX-XX
> How can i do this thanks a regexp
> thanks for your precious help.

You don't really need a regular expression.

$cmd =~ tr/:/-/;


John
-- 
use Perl;
program
fulfillment

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

Reply via email to