Expiring Today—Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

perl to mysql

Posted on 2013-12-18
4
Medium Priority
?
966 Views
Last Modified: 2013-12-19
that is my file which i want to insert to the mysql there are 5 coulmns

1. ip : 37.123.96.189
2. mac : 00:50:56:96:03:8B
3. port : 37
4. location :  K16
5. date of the inserted time

how should i do it with perl script ?



37.123.96.189 00:50:56:96:03:8B Port 37 K16
37.123.96.188 00:50:56:96:03:C3 Port 37 K16
37.123.96.187 00:50:56:96:1B:07 Port 37 K16
37.123.96.178 00:50:56:96:50:FA Port 37 K16
185.9.159.154 00:50:56:BE:00:B2 Port 3 K16
37.123.97.138 00:50:56:BE:01:A2 Port 1 K16
178.20.231.24 00:50:56:BE:03:6F Port 3 K16
185.9.159.71 00:50:56:BE:04:1D Port 3 K16
.N/A 00:50:56:BE:0C:AD Port 3 K16
N/A 00:50:56:BE:0F:BD Port 3 K16
178.20.228.225 00:50:56:BE:12:ED Port 12 K16
37.123.99.140 00:50:56:BE:13:8F Port 1 K16
178.20.227.236 00:50:56:BE:13:E0 Port 40 K16
185.9.157.126 00:50:56:BE:16:C6 Port 4 K16
178.20.227.169 00:50:56:BE:17:CC Port 12 K16
178.20.231.90 00:50:56:BE:17:DA Port 3 K16
185.9.157.156 00:50:56:BE:1C:60 Port 4 K16
185.9.159.182 00:50:56:BE:20:65 Port 3 K16
185.9.159.148 00:50:56:BE:22:AB Port 3 K16
37.123.97.89 00:50:56:BE:23:5E Port 1 K16
178.20.230.172 00:50:56:BE:26:81 Port 1 K16
185.9.159.85 00:50:56:BE:28:F5 Port 1 K16
178.20.227.170 00:50:56:BE:2F:8B Port 12 K16
185.9.159.60 00:50:56:BE:30:39 Port 3 K16
185.9.159.166 00:50:56:BE:35:B6 Port 3 K16
37.123.96.162 00:50:56:BE:36:C1 Port 1 K16
185.9.159.18 00:50:56:BE:3B:61 Port 3 K16
37.123.98.120 00:50:56:BE:3E:6E Port 1 K16
185.9.159.244 00:50:56:BE:40:7D Port 1 K16
185.9.156.134 00:50:56:BE:40:A8 Port 39 K16
185.9.159.72 00:50:56:BE:41:AD Port 3 K16
185.9.159.77 00:50:56:BE:42:B4 Port 3 K16
N/A 00:50:56:BE:45:40 Port 1 K16
185.9.159.172 00:50:56:BE:45:7E Port 1 K16
185.9.159.6 00:50:56:BE:46:C5 Port 3 K16
N/A 00:50:56:BE:47:5C Port 1 K16
178.20.227.168 00:50:56:BE:47:86 Port 12 K16
37.123.100.242 00:50:56:BE:47:C9 Port 10 K16
185.9.159.86 00:50:56:BE:49:BC Port 3 K16
37.123.100.241 00:50:56:BE:4C:E8 Port 10 K16
185.9.157.162 00:50:56:BE:4D:8E Port 4 K16
185.9.156.242 00:50:56:BE:4D:97 Port 1 K16
185.9.159.99 00:50:56:BE:50:30 Port 3 K16
185.9.159.25 00:50:56:BE:51:74 Port 3 K16
185.9.159.92 00:50:56:BE:52:60 Port 1 K16
185.9.159.106 00:50:56:BE:52:C4 Port 3 K16
178.20.231.207 00:50:56:BE:55:24 Port 1 K16
185.9.159.168 00:50:56:BE:56:47 Port 3 K16
37.123.98.39 00:50:56:BE:5C:2E Port 1 K16
185.9.159.167 00:50:56:BE:5D:D6 Port 3 K16
178.20.231.23 00:50:56:BE:5E:3D Port 3 K16
185.9.159.232 00:50:56:BE:5E:6A Port 3 K16
185.9.159.174 00:50:56:BE:62:3C Port 1 K16
178.20.230.188 00:50:56:BE:63:B9 Port 12 K16
178.20.227.150 00:50:56:BE:64:B5 Port 3 K16
178.20.231.231 00:50:56:BE:68:3F Port 1 K16
185.9.159.197 00:50:56:BE:6E:D3 Port 1 K16
37.123.98.25 00:50:56:BE:70:D8 Port 1 K16
185.9.159.176 00:50:56:BE:73:69 Port 1 K16
185.9.157.245 00:50:56:BE:74:D0 Port 1 K16
185.9.159.164 00:50:56:BE:7A:01 Port 1 K16
185.9.157.165 00:50:56:BE:83:B2 Port 4 K16
185.9.159.91 00:50:56:BE:84:D8 Port 3 K16
185.9.159.227 00:50:56:BE:87:A6 Port 1 K16
185.9.159.103 00:50:56:BE:8E:8F Port 3 K16
178.20.231.99 00:50:56:BE:93:03 Port 3 K16
185.9.159.21 00:50:56:BE:93:EE Port 3 K16
185.9.159.5 00:50:56:BE:94:A6 Port 1 K16
178.20.227.239 00:50:56:BE:95:89 Port 40 K16
185.9.156.101 00:50:56:BE:95:CE Port 1 K16
37.123.98.123 00:50:56:BE:98:A6 Port 1 K16
178.20.228.204 00:50:56:BE:9D:A2 Port 35 K16
185.9.157.129 00:50:56:BE:9E:55 Port 4 K16
178.20.227.245 00:50:56:BE:A3:FB Port 40 K16
185.9.159.70 00:50:56:BE:A4:56 Port 3 K16
185.9.159.169 00:50:56:BE:A5:86 Port 3 K16
185.9.159.3 00:50:56:BE:A6:C1 Port 1 K16
185.9.159.159 00:50:56:BE:A6:D4 Port 3 K16
185.9.159.240 00:50:56:BE:AC:6E Port 3 K16
185.9.159.80 00:50:56:BE:AC:EC Port 1 K16
178.20.228.224 00:50:56:BE:AE:87 Port 12 K16
37.123.98.115 00:50:56:BE:AE:9A Port 1 K16
185.9.159.151 00:50:56:BE:AF:D2 Port 3 K16
185.9.159.243 00:50:56:BE:B6:09 Port 3 K16
178.20.230.204 00:50:56:BE:B7:B8 Port 12 K16
178.20.230.156 00:50:56:BE:B7:CB Port 12 K16
185.9.159.121 00:50:56:BE:B8:A3 Port 3 K16
185.9.156.92 00:50:56:BE:C1:09 Port 39 K16
185.9.159.4 00:50:56:BE:CC:7D Port 1 K16
37.123.98.54 00:50:56:BE:CE:A4 Port 1 K16
178.20.224.234 00:50:56:BE:D0:49 Port 1 K16
178.20.230.137 00:50:56:BE:D5:EC Port 12 K16
185.9.157.127 00:50:56:BE:D7:6B Port 4 K16
185.9.159.74 00:50:56:BE:D9:2B Port 3 K16
185.9.159.158 00:50:56:BE:DD:CD Port 3 K16
N/A 00:50:56:BE:E3:0E Port 12 K16
185.9.159.178 00:50:56:BE:E3:7C Port 1 K16
185.9.159.108 00:50:56:BE:E8:14 Port 1 K16
185.9.157.131 00:50:56:BE:E8:C3 Port 4 K16
185.9.159.189 00:50:56:BE:E9:46 Port 3 K16
37.123.99.102 00:50:56:BE:EE:25 Port 3 K16
185.9.157.135 00:50:56:BE:F0:97 Port 4 K16
N/A 00:50:56:BE:F6:3F Port 1 K16
178.20.228.235 00:50:56:BE:FA:40 Port 12 K16
185.9.159.82 00:50:56:BE:FF:4D Port 3 K16
N/A 78:2B:CB:0D:BD:07 Port 1 K16
N/A 78:2B:CB:0D:BD:09 Port 23 K16
37.123.103.15 78:2B:CB:5A:34:68 Port 5 K16
185.9.156.155 78:2B:CB:5F:5E:47 Port 4 K16
185.9.156.147 78:2B:CB:66:93:73 Port 3 K16
185.9.159.249 84:2B:2B:62:65:16 Port 11 K16
185.9.156.148 B8:AC:6F:97:7C:C0 Port 40 K16
185.9.156.205 B8:AC:6F:97:80:38 Port 41 K16
185.9.156.108 B8:AC:6F:97:80:3A Port 41 K16
178.20.231.254 B8:AC:6F:97:82:6F Port 33 K16
185.9.156.203 BC:30:5B:D1:AF:F8 Port 35 K16
N/A BC:30:5B:DF:4F:C5 Port 44 K16
185.9.156.253 BC:30:5B:E2:25:6C Port 25 K16
185.9.156.189 BC:30:5B:E7:3E:15 Port 37 K16
185.9.156.142 D4:AE:52:71:18:88 Port 34 K16
185.9.159.222 D4:AE:52:71:40:D2 Port 6 K16
185.9.156.141 D4:AE:52:72:55:3D Port 8 K16
185.9.156.143 D4:AE:52:73:46:3C Port 10 K16
185.9.156.103 D4:AE:52:73:47:13 Port 7 K16
185.9.156.144 D4:AE:52:73:47:D0 Port 2 K16
185.9.156.82 00:01:55:12:5D:DA Port 20 K17
185.9.156.85 00:01:55:12:5D:DD Port 27 K17
N/A 00:0C:29:03:0D:01 Port 42 K17
N/A 00:0C:29:12:26:90 Port 42 K17
N/A 00:0C:29:14:5B:7D Port 42 K17
N/A 00:0C:29:1A:A8:21 Port 42 K17
N/A 00:0C:29:20:AD:35 Port 42 K17
N/A 00:0C:29:35:20:C5 Port 42 K17
N/A 00:0C:29:39:55:2C Port 42 K17
N/A 00:0C:29:54:9F:D1 Port 42 K17
N/A 00:0C:29:5A:4E:C9 Port 42 K17
N/A 00:0C:29:5E:7A:54 Port 42 K17
N/A 00:0C:29:84:73:5C Port 42 K17
N/A 00:0C:29:96:2B:83 Port 42 K17
N/A 00:0C:29:A0:D2:BC Port 42 K17
N/A 00:0C:29:A4:ED:1C Port 42 K17
N/A 00:0C:29:A9:87:02 Port 42 K17
N/A 00:0C:29:BB:C4:C3 Port 42 K17
N/A 00:0C:29:C2:4E:E7 Port 42 K17
N/A 00:0C:29:CE:32:77 Port 42 K17
N/A 00:0C:29:CE:63:08 Port 42 K17
N/A 00:0C:29:DB:D8:26 Port 3 K17
N/A 00:0C:29:E9:F8:65 Port 42 K17
185.9.156.63 00:25:90:95:7A:6E Port 26 K17
185.9.156.64 00:25:90:9E:61:FB Port 26 K17
185.9.156.18 00:25:90:A1:D2:02 Port 21 K17
185.9.156.14 00:25:90:A1:D2:D6 Port 38 K17
185.9.156.17 00:25:90:A1:D5:56 Port 21 K17
185.9.156.29 00:25:90:A1:D5:77 Port 33 K17
185.9.156.22 00:25:90:A4:3A:74 Port 15 K17
185.9.156.20 00:25:90:A4:3A:82 Port 19 K17
185.9.156.45 00:25:90:A4:3D:CF Port 6 K17
185.9.156.19 00:25:90:A4:3E:DE Port 19 K17
185.9.156.24 00:25:90:A4:3F:FD Port 37 K17
185.9.156.16 00:25:90:A4:40:2F Port 17 K17
185.9.156.12 00:25:90:A4:41:22 Port 23 K17
185.9.156.8 00:25:90:A4:41:36 Port 42 K17
185.9.156.26 00:25:90:A4:41:5E Port 31 K17
185.9.156.52 00:25:90:A4:41:6E Port 5 K17
185.9.156.51 00:25:90:A4:42:52 Port 5 K17
185.9.156.25 00:25:90:A4:42:72 Port 31 K17
185.9.156.7 00:25:90:A4:42:C2 Port 42 K17
185.9.156.11 00:25:90:A4:42:EB Port 23 K17
185.9.156.15 00:25:90:A4:44:D0 Port 17 K17
185.9.156.4 00:25:90:A4:55:5B Port 8 K17
185.9.156.3 00:25:90:A4:56:20 Port 8 K17
185.9.156.54 00:25:90:A8:97:2D Port 43 K17
185.9.156.48 00:25:90:A8:97:2F Port 39 K17
185.9.156.58 00:25:90:A8:97:3C Port 40 K17
185.9.156.60 00:25:90:A8:97:41 Port 2 K17
185.9.156.44 00:25:90:A8:97:42 Port 44 K17
185.9.156.56 00:25:90:A8:97:43 Port 3 K17
185.9.156.62 00:25:90:A8:97:44 Port 4 K17
185.9.156.40 00:25:90:A8:97:46 Port 7 K17
185.9.158.13 00:25:90:A8:99:51 Port 41 K17
185.9.156.33 00:25:90:A8:9A:7F Port 9 K17
185.9.156.37 00:25:90:A8:9A:9F Port 11 K17
185.9.156.55 00:25:90:A8:9A:BC Port 3 K17
185.9.156.43 00:25:90:A8:9A:BE Port 44 K17
185.9.156.31 00:25:90:A8:9A:C3 Port 12 K17
185.9.156.53 00:25:90:A8:9A:E8 Port 43 K17
185.9.159.253 00:25:90:A8:9A:EF Port 36 K17
185.9.156.27 00:25:90:A8:9A:F7 Port 24 K17
185.9.156.35 00:25:90:A8:9A:F9 Port 13 K17
N/A 00:50:56:B0:0B:1C Port 3 K17
N/A 00:50:56:B0:0E:07 Port 3 K17
178.20.227.86 00:50:56:B0:22:AE Port 3 K17
178.20.227.73 00:50:56:B0:23:91 Port 3 K17
178.20.227.78 00:50:56:B0:2C:67 Port 3 K17
178.20.227.75 00:50:56:B0:46:22 Port 3 K17
178.20.227.77 00:50:56:B0:49:BD Port 3 K17
178.20.228.32 00:50:56:B0:5E:7C Port 3 K17
178.20.228.38 00:50:56:B0:81:50 Port 3 K17
178.20.227.76 00:50:56:B0:AA:E7 Port 3 K17
178.20.227.90 00:50:56:B0:AC:C5 Port 3 K17
37.123.100.28 00:50:56:B0:C4:33 Port 31 K17
178.20.228.37 00:50:56:B0:D8:1D Port 3 K17
178.20.228.65 00:50:56:B0:DA:66 Port 23 K17
178.20.227.84 00:50:56:B0:E0:E5 Port 3 K17
178.20.228.156 00:50:56:B0:EF:39 Port 23 K17
178.20.227.114 00:50:56:B9:20:3F Port 31 K17
37.123.100.135 00:50:56:B9:28:D7 Port 31 K17
178.20.227.71 00:50:56:B9:33:1F Port 3 K17
37.123.100.30 00:50:56:B9:39:35 Port 31 K17
37.123.100.133 00:50:56:B9:40:22 Port 31 K17
178.20.225.83 00:50:56:B9:4F:9A Port 31 K17
178.20.228.85 00:50:56:B9:51:3C Port 23 K17
37.123.100.4 00:50:56:B9:70:72 Port 31 K17
37.123.100.126 00:50:56:B9:77:36 Port 31 K17
37.123.100.130 00:50:56:B9:82:98 Port 31 K17
37.123.100.132 00:50:56:B9:8C:38 Port 31 K17
178.20.228.56 00:50:56:B9:9C:29 Port 23 K17
37.123.100.138 00:50:56:B9:AF:42 Port 31 K17
178.20.227.72 00:50:56:B9:BF:89 Port 3 K17
37.123.100.131 00:50:56:B9:BF:DC Port 31 K17
178.20.228.152 00:50:56:B9:C2:E8 Port 23 K17
37.123.100.134 00:50:56:B9:CE:AE Port 31 K17
37.123.103.253 00:50:56:B9:E8:C1 Port 31 K17
178.20.226.143 00:50:56:BE:03:BC Port 5 K17
185.9.159.84 00:50:56:BE:04:34 Port 22 K17
178.20.224.38 00:50:56:BE:05:49 Port 32 K17
N/A 00:50:56:BE:0C:5B Port 5 K17
178.20.224.19 00:50:56:BE:13:CF Port 32 K17
185.9.159.37 00:50:56:BE:13:E4 Port 22 K17
185.9.159.28 00:50:56:BE:16:72 Port 22 K17
178.20.224.13 00:50:56:BE:16:A7 Port 21 K17
185.9.159.14 00:50:56:BE:1A:28 Port 22 K17
178.20.226.123 00:50:56:BE:1E:B1 Port 5 K17
178.20.226.129 00:50:56:BE:1F:A3 Port 5 K17
178.20.224.33 00:50:56:BE:22:15 Port 21 K17
178.20.224.22 00:50:56:BE:22:D3 Port 21 K17
178.20.226.128 00:50:56:BE:27:E2 Port 5 K17
185.9.159.44 00:50:56:BE:2D:38 Port 22 K17
185.9.159.33 00:50:56:BE:2D:3F Port 22 K17
185.9.159.20 00:50:56:BE:2D:77 Port 22 K17
178.20.224.26 00:50:56:BE:2D:83 Port 21 K17
178.20.224.14 00:50:56:BE:2D:B5 Port 21 K17
185.9.159.138 00:50:56:BE:2D:CD Port 43 K17
185.9.159.12 00:50:56:BE:2D:E9 Port 22 K17
185.9.159.251 00:50:56:BE:30:59 Port 22 K17
178.20.224.17 00:50:56:BE:30:FA Port 32 K17
185.9.159.55 00:50:56:BE:31:3C Port 22 K17
37.123.99.216 00:50:56:BE:31:5D Port 42 K17
185.9.159.56 00:50:56:BE:32:3E Port 22 K17
N/A 00:50:56:BE:32:55 Port 19 K17
37.123.100.118 00:50:56:BE:33:42 Port 43 K17
178.20.226.121 00:50:56:BE:3A:9F Port 5 K17
178.20.224.25 00:50:56:BE:3E:70 Port 21 K17
178.20.224.27 00:50:56:BE:3E:D3 Port 21 K17
178.20.224.16 00:50:56:BE:44:E0 Port 21 K17
185.9.159.234 00:50:56:BE:4D:1E Port 42 K17
178.20.226.186 00:50:56:BE:50:75 Port 32 K17
185.9.159.53 00:50:56:BE:51:17 Port 22 K17
185.9.159.13 00:50:56:BE:51:7C Port 22 K17
178.20.224.24 00:50:56:BE:51:99 Port 32 K17
185.9.159.8 00:50:56:BE:54:2C Port 22 K17
185.9.159.42 00:50:56:BE:55:C0 Port 22 K17
178.20.224.11 00:50:56:BE:58:1A Port 21 K17
178.20.226.149 00:50:56:BE:5C:EA Port 5 K17
185.9.159.15 00:50:56:BE:60:B8 Port 22 K17
185.9.159.94 00:50:56:BE:61:5F Port 22 K17
178.20.224.18 00:50:56:BE:61:8F Port 21 K17
185.9.159.95 00:50:56:BE:62:66 Port 22 K17
185.9.159.10 00:50:56:BE:69:90 Port 22 K17
178.20.226.144 00:50:56:BE:6A:62 Port 5 K17
37.123.103.62 00:50:56:BE:6A:87 Port 19 K17
178.20.224.15 00:50:56:BE:6B:C5 Port 21 K17
178.20.226.185 00:50:56:BE:6E:53 Port 32 K17
178.20.226.14 00:50:56:BE:6E:EB Port 17 K17
185.9.159.27 00:50:56:BE:6F:B5 Port 22 K17
185.9.159.54 00:50:56:BE:71:C5 Port 22 K17
178.20.226.16 00:50:56:BE:73:07 Port 17 K17
185.9.159.31 00:50:56:BE:73:D3 Port 22 K17
178.20.226.134 00:50:56:BE:74:2F Port 5 K17
185.9.159.50 00:50:56:BE:74:D3 Port 22 K17
178.20.226.136 00:50:56:BE:79:A2 Port 5 K17
185.9.159.34 00:50:56:BE:7B:B9 Port 22 K17
185.9.159.26 00:50:56:BE:7C:E1 Port 22 K17
178.20.226.130 00:50:56:BE:7E:F9 Port 5 K17
178.20.226.20 00:50:56:BE:81:83 Port 17 K17
185.9.159.29 00:50:56:BE:85:E0 Port 22 K17
178.20.224.12 00:50:56:BE:86:67 Port 21 K17
37.123.99.213 00:50:56:BE:88:D5 Port 42 K17
178.20.226.187 00:50:56:BE:8A:E3 Port 32 K17
178.20.226.13 00:50:56:BE:90:1F Port 17 K17
185.9.159.22 00:50:56:BE:91:87 Port 22 K17
178.20.226.190 00:50:56:BE:91:C3 Port 32 K17
178.20.226.127 00:50:56:BE:94:69 Port 5 K17
185.9.159.117 00:50:56:BE:94:6E Port 22 K17
185.9.159.134 00:50:56:BE:9B:A6 Port 43 K17
178.20.226.189 00:50:56:BE:9D:C2 Port 32 K17
37.123.100.116 00:50:56:BE:A1:C6 Port 43 K17
185.9.159.181 00:50:56:BE:A5:DD Port 22 K17
178.20.224.20 00:50:56:BE:A7:2F Port 21 K17
178.20.226.141 00:50:56:BE:A9:4B Port 5 K17
178.20.224.28 00:50:56:BE:AB:7B Port 21 K17
185.9.159.119 00:50:56:BE:AB:D4 Port 43 K17
185.9.159.39 00:50:56:BE:AE:25 Port 22 K17
178.20.224.34 00:50:56:BE:B0:76 Port 21 K17
178.20.224.31 00:50:56:BE:B0:AC Port 21 K17
178.20.226.146 00:50:56:BE:B1:AB Port 5 K17
178.20.224.30 00:50:56:BE:B3:05 Port 21 K17
178.20.226.140 00:50:56:BE:B3:66 Port 5 K17
185.9.159.30 00:50:56:BE:B4:F9 Port 22 K17
185.9.159.41 00:50:56:BE:B5:F8 Port 22 K17
178.20.226.150 00:50:56:BE:B7:CC Port 5 K17
N/A 00:50:56:BE:B8:0B Port 21 K17
185.9.159.59 00:50:56:BE:B8:98 Port 22 K17
178.20.226.67 00:50:56:BE:B9:55 Port 17 K17
185.9.159.35 00:50:56:BE:C0:2D Port 22 K17
178.20.224.153 00:50:56:BE:C1:1B Port 21 K17
178.20.226.19 00:50:56:BE:C3:5A Port 17 K17
178.20.226.132 00:50:56:BE:C3:EF Port 5 K17
185.9.159.52 00:50:56:BE:C5:39 Port 22 K17
178.20.226.18 00:50:56:BE:C5:57 Port 17 K17
178.20.226.188 00:50:56:BE:C6:72 Port 32 K17
N/A 00:50:56:BE:C7:0B Port 5 K17
178.20.226.142 00:50:56:BE:CD:47 Port 5 K17
178.20.226.17 00:50:56:BE:D3:D3 Port 17 K17
N/A 00:50:56:BE:D5:0D Port 22 K17
185.9.159.64 00:50:56:BE:D5:E9 Port 22 K17
185.9.159.11 00:50:56:BE:D7:16 Port 22 K17
178.20.226.131 00:50:56:BE:D8:74 Port 5 K17
185.9.159.43 00:50:56:BE:DA:56 Port 22 K17
178.20.224.32 00:50:56:BE:DD:84 Port 21 K17
178.20.224.29 00:50:56:BE:DE:82 Port 21 K17
185.9.159.38 00:50:56:BE:E0:D3 Port 22 K17
178.20.226.126 00:50:56:BE:E8:EA Port 5 K17
178.20.226.135 00:50:56:BE:ED:AB Port 5 K17
185.9.159.2 00:50:56:BE:F0:31 Port 22 K17
185.9.159.49 00:50:56:BE:F1:4B Port 22 K17
185.9.159.254 00:50:56:BE:F1:5F Port 22 K17
37.123.103.43 00:50:56:BE:F2:48 Port 19 K17
178.20.226.147 00:50:56:BE:F3:F6 Port 5 K17
185.9.159.40 00:50:56:BE:F5:1C Port 22 K17
185.9.159.96 00:50:56:BE:F5:D9 Port 22 K17
178.20.224.10 00:50:56:BE:F6:AE Port 21 K17
185.9.159.32 00:50:56:BE:F8:96 Port 22 K17
178.20.226.137 00:50:56:BE:F9:60 Port 5 K17
178.20.226.125 00:50:56:BE:F9:75 Port 5 K17
178.20.226.68 00:50:56:BE:F9:88 Port 17 K17
N/A 00:50:56:BE:FA:0F Port 5 K17
185.9.159.46 00:50:56:BE:FA:16 Port 22 K17
185.9.159.57 00:50:56:BE:FE:37 Port 22 K17
178.20.226.145 00:50:56:BE:FF:5D Port 5 K17
185.9.156.244 00:80:F0:D2:61:66 Port 45 K17
185.9.156.89 00:E0:4C:46:4B:28 Port 32 K17
185.9.156.252 BC:30:5B:E2:25:64 Port 22 K17
185.9.157.54 00:02:A5:4F:26:75 Port 15 T01
185.9.159.202 00:04:AC:E3:E8:49 Port 8 T01
N/A 00:0C:29:4C:58:DE Port 23 T01
N/A 00:0C:29:63:C1:D4 Port 6 T01
N/A 00:0C:29:96:26:FE Port 26 T01
N/A 00:0C:29:DE:4E:E5 Port 26 T01
N/A 00:0C:29:F2:71:DD Port 26 T01
N/A 00:0E:7F:EC:1D:8E Port 23 T01
185.9.156.100 00:1B:21:2F:65:F4 Port 1 T01
185.9.156.207 00:1B:21:2F:69:31 Port 24 T01
185.9.156.9 00:1B:21:2F:69:3A Port 9 T01
185.9.156.129 00:1B:21:2F:69:47 Port 4 T01
185.9.156.110 00:1B:21:9C:03:D1 Port 17 T01
185.9.156.116 00:1B:21:C6:58:25 Port 28 T01
178.20.227.33 00:50:56:B0:08:E8 Port 23 T01
178.20.228.77 00:50:56:B0:26:10 Port 29 T01
178.20.227.42 00:50:56:B0:4B:F6 Port 23 T01
178.20.228.30 00:50:56:B0:4E:74 Port 29 T01
178.20.228.126 00:50:56:B0:52:5F Port 26 T01
178.20.228.157 00:50:56:B0:5E:29 Port 29 T01
178.20.227.43 00:50:56:B0:63:B1 Port 23 T01
178.20.228.128 00:50:56:B0:65:A2 Port 26 T01
178.20.227.227 00:50:56:B0:6A:9C Port 29 T01
178.20.228.43 00:50:56:B0:81:B2 Port 29 T01
178.20.228.69 00:50:56:B0:90:55 Port 29 T01
178.20.228.75 00:50:56:B0:95:AB Port 29 T01
178.20.228.89 00:50:56:B0:A9:64 Port 29 T01
178.20.228.62 00:50:56:B0:AF:5C Port 29 T01
178.20.227.44 00:50:56:B0:BC:99 Port 23 T01
178.20.227.39 00:50:56:B0:CE:A7 Port 23 T01
178.20.227.37 00:50:56:B0:D3:B0 Port 23 T01
178.20.227.48 00:50:56:B0:DD:EC Port 23 T01
178.20.227.41 00:50:56:B0:EC:02 Port 23 T01
178.20.227.46 00:50:56:B0:EF:AB Port 23 T01
178.20.227.45 00:50:56:B0:F6:18 Port 23 T01
178.20.228.90 00:50:56:B0:FE:25 Port 29 T01
N/A 00:50:56:B5:0A:AF Port 12 T01
37.123.100.60 00:50:56:B5:1D:BC Port 2 T01
37.123.100.59 00:50:56:B5:2F:44 Port 2 T01
37.123.100.43 00:50:56:B5:2F:B5 Port 2 T01
37.123.100.208 00:50:56:B5:35:E5 Port 12 T01
37.123.100.218 00:50:56:B5:3A:06 Port 12 T01
37.123.100.53 00:50:56:B5:54:4E Port 2 T01
37.123.100.217 00:50:56:B5:59:EE Port 12 T01
37.123.100.42 00:50:56:B5:5F:FA Port 2 T01
37.123.100.215 00:50:56:B5:66:E7 Port 12 T01
37.123.100.214 00:50:56:B5:69:56 Port 12 T01
37.123.100.35 00:50:56:B5:72:AC Port 2 T01
37.123.100.206 00:50:56:B5:78:08 Port 12 T01
37.123.100.219 00:50:56:B5:7B:EF Port 12 T01
37.123.100.36 00:50:56:B5:7B:F9 Port 2 T01
37.123.100.211 00:50:56:B5:81:5D Port 12 T01
37.123.100.213 00:50:56:B5:A2:4D Port 12 T01
37.123.100.49 00:50:56:B5:AA:E6 Port 2 T01
37.123.100.48 00:50:56:B5:AF:A2 Port 2 T01
37.123.100.34 00:50:56:B5:C1:3C Port 2 T01
N/A 00:50:56:B5:D0:0D Port 12 T01
37.123.100.220 00:50:56:B5:D2:67 Port 12 T01
37.123.100.203 00:50:56:B5:D3:F2 Port 12 T01
37.123.100.54 00:50:56:B5:ED:B7 Port 2 T01
37.123.100.44 00:50:56:B5:EF:19 Port 2 T01
37.123.100.50 00:50:56:B5:F4:71 Port 2 T01
37.123.100.216 00:50:56:B5:F5:A5 Port 12 T01
37.123.100.210 00:50:56:B5:FA:13 Port 12 T01
37.123.100.55 00:50:56:B5:FD:09 Port 2 T01
178.20.227.38 00:50:56:B9:02:A2 Port 23 T01
N/A 00:50:56:B9:0A:51 Port 23 T01
37.123.98.237 00:50:56:B9:1B:BE Port 1 T01
178.20.228.120 00:50:56:B9:20:C1 Port 26 T01
N/A 00:50:56:B9:34:0A Port 29 T01
178.20.228.88 00:50:56:B9:34:4D Port 29 T01
178.20.228.73 00:50:56:B9:4D:27 Port 29 T01
178.20.228.34 00:50:56:B9:4E:91 Port 29 T01
178.20.226.152 00:50:56:B9:66:47 Port 6 T01
178.20.227.40 00:50:56:B9:66:79 Port 23 T01
178.20.228.44 00:50:56:B9:6C:24 Port 29 T01
178.20.227.32 00:50:56:B9:99:D5 Port 23 T01
178.20.228.63 00:50:56:B9:BC:58 Port 29 T01
178.20.228.87 00:50:56:B9:C4:CB Port 29 T01
178.20.228.121 00:50:56:B9:C5:4B Port 26 T01
178.20.226.154 00:50:56:B9:D2:F6 Port 6 T01
178.20.228.74 00:50:56:B9:D6:AD Port 29 T01
178.20.226.179 00:50:56:B9:E4:C8 Port 6 T01
178.20.227.34 00:50:56:B9:F3:89 Port 23 T01
178.20.228.31 00:50:56:B9:FA:C8 Port 29 T01
37.123.100.41 00:50:56:B9:FE:7A Port 2 T01
178.20.231.154 00:50:56:BE:00:6B Port 18 T01
185.9.157.229 00:50:56:BE:01:F6 Port 28 T01
178.20.231.211 00:50:56:BE:06:91 Port 17 T01
178.20.231.163 00:50:56:BE:07:FA Port 18 T01
N/A 00:50:56:BE:0A:2D Port 21 T01
N/A 00:50:56:BE:0A:8F Port 43 T01
37.123.97.91 00:50:56:BE:13:BF Port 9 T01
185.9.157.246 00:50:56:BE:17:66 Port 28 T01
185.9.157.191 00:50:56:BE:18:E8 Port 21 T01
185.9.157.230 00:50:56:BE:19:90 Port 28 T01
178.20.231.162 00:50:56:BE:1B:EA Port 18 T01
178.20.231.179 00:50:56:BE:1E:01 Port 18 T01
178.20.225.91 00:50:56:BE:25:E4 Port 45 T01
185.9.157.193 00:50:56:BE:29:E7 Port 21 T01
178.20.231.210 00:50:56:BE:2A:56 Port 17 T01
37.123.97.75 00:50:56:BE:2A:ED Port 9 T01
185.9.157.237 00:50:56:BE:2D:DE Port 28 T01
178.20.231.176 00:50:56:BE:2E:D5 Port 18 T01
178.20.231.184 00:50:56:BE:32:9D Port 18 T01
N/A 00:50:56:BE:40:0E Port 18 T01
37.123.97.80 00:50:56:BE:42:8A Port 9 T01
37.123.97.81 00:50:56:BE:4A:4C Port 9 T01
185.9.157.248 00:50:56:BE:4C:75 Port 28 T01
185.9.157.176 00:50:56:BE:4F:28 Port 21 T01
178.20.231.171 00:50:56:BE:53:37 Port 18 T01
178.20.231.181 00:50:56:BE:54:49 Port 18 T01
178.20.231.157 00:50:56:BE:56:5A Port 18 T01
185.9.157.187 00:50:56:BE:56:A9 Port 21 T01
185.9.157.192 00:50:56:BE:57:11 Port 21 T01
178.20.231.164 00:50:56:BE:57:36 Port 18 T01
185.9.157.185 00:50:56:BE:57:B7 Port 21 T01
185.9.157.178 00:50:56:BE:59:C2 Port 21 T01
185.9.157.242 00:50:56:BE:61:58 Port 28 T01
178.20.226.10 00:50:56:BE:62:8B Port 19 T01
185.9.157.253 00:50:56:BE:63:7D Port 28 T01
178.20.231.168 00:50:56:BE:69:9D Port 18 T01
178.20.231.214 00:50:56:BE:77:66 Port 17 T01
185.9.157.184 00:50:56:BE:7C:68 Port 21 T01
185.9.157.174 00:50:56:BE:7F:06 Port 21 T01
178.20.225.238 00:50:56:BE:81:06 Port 4 T01
178.20.231.159 00:50:56:BE:81:47 Port 18 T01
185.9.157.251 00:50:56:BE:81:7B Port 28 T01
185.9.157.231 00:50:56:BE:82:E2 Port 28 T01
185.9.159.230 00:50:56:BE:85:9A Port 17 T01
185.9.157.232 00:50:56:BE:8B:A3 Port 28 T01
185.9.157.181 00:50:56:BE:94:6C Port 21 T01
185.9.157.175 00:50:56:BE:96:B4 Port 21 T01
178.20.225.237 00:50:56:BE:9D:97 Port 4 T01
178.20.231.175 00:50:56:BE:A2:88 Port 18 T01
185.9.157.247 00:50:56:BE:A5:6B Port 28 T01
185.9.159.160 00:50:56:BE:A6:59 Port 17 T01
178.20.231.167 00:50:56:BE:A6:C4 Port 18 T01
185.9.157.252 00:50:56:BE:AF:CE Port 28 T01
178.20.231.177 00:50:56:BE:B0:4C Port 18 T01
185.9.157.234 00:50:56:BE:B0:7C Port 28 T01
185.9.157.254 00:50:56:BE:B1:C0 Port 28 T01
178.20.226.12 00:50:56:BE:B3:FC Port 19 T01
178.20.231.155 00:50:56:BE:B4:71 Port 18 T01
178.20.231.174 00:50:56:BE:B5:8F Port 18 T01
185.9.157.188 00:50:56:BE:B6:1F Port 21 T01
178.20.231.185 00:50:56:BE:B9:6B Port 18 T01
178.20.231.170 00:50:56:BE:B9:79 Port 18 T01
185.9.157.250 00:50:56:BE:BC:42 Port 28 T01
185.9.159.157 00:50:56:BE:BC:B6 Port 17 T01
178.20.231.160 00:50:56:BE:BE:27 Port 18 T01
185.9.159.16 00:50:56:BE:BE:37 Port 17 T01
178.20.231.169 00:50:56:BE:BE:67 Port 18 T01
185.9.159.122 00:50:56:BE:BE:F1 Port 17 T01
178.20.231.156 00:50:56:BE:C1:45 Port 18 T01
178.20.231.158 00:50:56:BE:C7:D0 Port 18 T01
185.9.157.222 00:50:56:BE:C9:04 Port 28 T01
178.20.231.212 00:50:56:BE:CD:97 Port 17 T01
185.9.157.239 00:50:56:BE:D5:8A Port 28 T01
185.9.157.238 00:50:56:BE:D6:02 Port 28 T01
178.20.231.178 00:50:56:BE:DA:6C Port 18 T01
185.9.159.61 00:50:56:BE:E1:C3 Port 17 T01
185.9.157.243 00:50:56:BE:E4:E7 Port 28 T01
185.9.157.189 00:50:56:BE:EB:52 Port 21 T01
178.20.227.200 00:50:56:BE:EC:A0 Port 1 T01
185.9.157.240 00:50:56:BE:F0:36 Port 28 T01
185.9.157.186 00:50:56:BE:F2:44 Port 21 T01
185.9.159.225 00:50:56:BE:F2:AC Port 17 T01
185.9.159.104 00:50:56:BE:F3:AA Port 17 T01
185.9.157.249 00:50:56:BE:F5:42 Port 28 T01
37.123.97.70 00:50:56:BE:F7:9F Port 9 T01
185.9.157.223 00:50:56:BE:FA:45 Port 28 T01
185.9.159.135 00:50:56:BE:FB:53 Port 17 T01
185.9.157.241 00:50:56:BE:FC:77 Port 28 T01
185.9.157.233 00:50:56:BE:FC:DE Port 28 T01
185.9.157.190 00:50:56:BE:FF:5B Port 21 T01
185.9.156.204 00:E0:4C:45:C8:06 Port 6 T01
185.9.156.199 00:E0:4C:46:48:57 Port 21 T01
185.9.156.118 68:05:CA:11:C1:4B Port 29 T01
185.9.156.120 68:05:CA:11:C1:58 Port 3 T01
185.9.156.160 68:05:CA:11:CE:C3 Port 45 T01
185.9.156.115 68:05:CA:11:D4:6C Port 18 T01
185.9.156.124 68:05:CA:12:71:F3 Port 33 T01
185.9.156.113 68:05:CA:12:71:F8 Port 26 T01
185.9.156.158 68:05:CA:12:72:05 Port 19 T01
37.123.96.19 90:2B:34:9D:53:CB Port 25 T01
185.9.156.70 90:2B:34:9D:58:4F Port 2 T01
185.9.156.77 90:2B:34:A0:42:F3 Port 14 T01
185.9.156.105 90:2B:34:A8:47:A0 Port 5 T01
185.9.156.107 90:2B:34:A8:51:21 Port 13 T01
185.9.156.79 90:2B:34:A8:51:6C Port 12 T01
185.9.156.127 E0:69:95:2E:88:90 Port 38 T01
37.123.96.39 E0:69:95:2E:90:A4 Port 37 T01
185.9.156.136 F4:6D:04:04:BB:A7 Port 31 T01

Open in new window

0
Comment
Question by:3XLcom
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 28

Expert Comment

by:FishMonger
ID: 39729398
What have you tried thus far?

What part of the process is giving you trouble?

What is your level of Perl knowledge?
0
 

Author Comment

by:3XLcom
ID: 39729417
nearly nothing we are just sending values to mysql db via perl
we are good at .net after getting values into mysql we are going on our way ;)

we are just trying to collect on cent os side what we need to do on centos side
0
 
LVL 28

Accepted Solution

by:
FishMonger earned 2000 total points
ID: 39729577
This could use some additional error checking/handling and may need a slight adjustment on the date field portion, but should do what you need assuming I understood your needs.

#!/usr/bin/perl

use strict;
use warnings;
use DBI;

my $file = '/path/to/datafile';
open my $fh, '<', $file or die "failed to open '$file' <$!>";

my $dbh = DBI->connect("DBI:mysql:your_db:db_server", 'user', 'password',
                       { RaiseError => 1 })
       or die "failed to connect to database <$DBI::errstr>";

# I don't recall if putting the mysql NOW() function in the prepare statement like this will work.
# If it fails, then we'll need to add the date value to the execute statement
my $sth = $dbh->prepare("INSERT INTO tablename(IP, MAC, port, location, date) VALUES(?,?,?,?,NOW())");

while (my $line = <$fh>) {
    chomp $line;
    my ($ip,$mac,$port,$location) = (split(' ', $line))[0,1,3,4];
    next if $ip !~ /^(\d+\.){3}\d+$/;
    $sth->execute($ip,$mac,$port,$location);
}
close $fh;
$dbh->disconnect;

Open in new window

0
 

Author Closing Comment

by:3XLcom
ID: 39729595
wonderfull thanks
0

Featured Post

New benefit for Premium Members - Upgrade now!

Ready to get started with anonymous questions today? It's easy! Learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A year or so back I was asked to have a play with MongoDB; within half an hour I had downloaded (http://www.mongodb.org/downloads),  installed and started the daemon, and had a console window open. After an hour or two of playing at the command …
Checking the Alert Log in AWS RDS Oracle can be a pain through their user interface.  I made a script to download the Alert Log, look for errors, and email me the trace files.  In this article I'll describe what I did and share my script.
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
Six Sigma Control Plans

719 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question