#!/usr/bin/perl use warnings; use strict; my @eachlinecmd = split ('/\n/,', `ping 127.0.0.1`); my @eachwordcmd = split ('/\w/,', @eachlinecmd); print "@eachlinecmd\n"; print "@eachwordcmd\n"; print "$eachlinecmd[4]\n"; print "$eachwordcmd[3]\n"; #### C:\Users\perl514\Documents\perl\practice>perl split.pl Pinging 127.0.0.1 with 32 bytes of data: Reply from 127.0.0.1: bytes=32 time<1ms TTL=64 Reply from 127.0.0.1: bytes=32 time<1ms TTL=64 Reply from 127.0.0.1: bytes=32 time<1ms TTL=64 Reply from 127.0.0.1: bytes=32 time<1ms TTL=64 Ping statistics for 127.0.0.1: Packets: Sent = 4, Received = 4, Lost = 0 (0% loss), Approximate round trip times in milli-seconds: Minimum = 0ms, Maximum = 0ms, Average = 0ms 1 Use of uninitialized value $eachlinecmd[4] in concatenation (.) or string at split.pl line 9. Use of uninitialized value $eachwordcmd[3] in concatenation (.) or string at split.pl line 10.