#!/usr/bin/perl $ping = "Pinging 124.21.84.69 with 4 bytes of data\n\n Error could not ping\n\n\n"; %commands = ('/help' => 'This is the help part', '/ping' => $ping); print "enter command:\n"; $com = ; print $commands{'$com'};