perl ping script

Dear All
Any one able been writing any command ping in perl??basically i want to wring ping script to send 1000 packet ping then initiate "Ctrl C' terminal to ping example below:-]
#!/usr/local/bin/perl
$r=`/bin/ping 172.23.11.254`;

Thank You

---------- Post updated at 10:27 PM ---------- Previous update was at 08:14 PM ----------

basically the script i want to get the ping statistics. normally i have to run ping command then "Ctrl C" to get the ping statistics

--- 172.23.11.254 ping statistics ---
1000 packets transmitted, 1000 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.267/0.267/0.267/0.000 ms

you can all 'ping -c <number>' e.g. 'ping -c 100' to specify when ping should exit. You can also specify '-t' with a number of seconds for timeouts. you don't have to exit with ctrl-c.

in solaris seem not working:mad:

---------- Post updated at 03:33 AM ---------- Previous update was at 01:51 AM ----------

Hi varontron thank your help..i can ping statistics in solaris i just use
'ping -s 172.23.11.254 64 100' then can already

/usr/sbin/ping -s [-l | -U] [-adlLnrRv] [-A addr_family]
[-c traffic_class] [-g gateway [ -g gateway...]] [-
F flow_label] [-I interval] [-i interface] [-P tos] [-
p port] [-t ttl] host [data_size] [npackets]

---------- Post updated at 03:33 AM ---------- Previous update was at 03:33 AM ----------

Hi varontron thank your help..i can ping statistics in solaris i just use
'ping -s 172.23.11.254 64 100' then can already

/usr/sbin/ping -s [-l | -U] [-adlLnrRv] [-A addr_family]
[-c traffic_class] [-g gateway [ -g gateway...]] [-
F flow_label] [-I interval] [-i interface] [-P tos] [-
p port] [-t ttl] host [data_size] [npackets]