in reply to How do I select first string of a two dimensional array to compare to other values?
#!/usr/bin/perl use strict; use warnings; use feature qw/ say /; my $first = ( split ',', <DATA> )[0]; say $first; __DATA__ 1424621700, 2015-02-22 16:15:00, 4294.700 1424621760, 2015-02-22 16:16:00, 4289.700 1424621820, 2015-02-22 16:17:00, 4299.800 1424621880, 2015-02-22 16:18:00, 4302.800 1424621940, 2015-02-22 16:19:00, 4296.900 1424622000, 2015-02-22 16:20:00, 4301.000 1424622060, 2015-02-22 16:21:00, 4300.300
$ perl 1140499.pl 1424621700 $
++james28909 for making me see it more simply.
|
|---|