So how does your current code fail to serve your purposes? An alternative:
c:\@Work\Perl\monks>perl -wMstrict -le "my $line = qq{1424621700, 2015-02-22 16:15:00, 4294.700\n}; chomp $line; print qq{'$line'}; ;; my ($first) = split m{ , \s* }xms, $line; print qq{'$first'}; " '1424621700, 2015-02-22 16:15:00, 4294.700' '1424621700'
Update: Ah, I see it now:
my $first_line = $splits;
and again, how can this compile with strict enabled? You probably want something like the
my $first_line = $splits[0];
statement you had before.
Give a man a fish: <%-{-{-{-<
In reply to Re^3: How do I select first string of a two dimensional array to compare to other values?
by AnomalousMonk
in thread How do I select first string of a two dimensional array to compare to other values?
by joi1369
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |